mirror of https://github.com/abpframework/abp.git
1 changed files with 22 additions and 0 deletions
@ -0,0 +1,22 @@ |
|||||
|
import { createHostFactory, SpectatorHost } from '@ngneat/spectator'; |
||||
|
import { CardSubtitle } from '../components'; |
||||
|
|
||||
|
describe('AbpCardSubtitleDirective', () => { |
||||
|
let spectator: SpectatorHost<CardSubtitle>; |
||||
|
|
||||
|
const createHost = createHostFactory(CardSubtitle); |
||||
|
|
||||
|
beforeEach(() => (spectator = createHost(`<p abpCardSubtitle>CardSubtitle</p>`))); |
||||
|
|
||||
|
it('should create an instance', () => { |
||||
|
expect(spectator).toBeTruthy(); |
||||
|
}); |
||||
|
|
||||
|
it('should have class card-subtitle', () => { |
||||
|
expect(spectator.element.classList).toContain('card-subtitle'); |
||||
|
}); |
||||
|
|
||||
|
it('should have CardSubtitle text', () => { |
||||
|
expect(spectator.element.textContent).toContain('CardSubtitle'); |
||||
|
}); |
||||
|
}); |
||||
Loading…
Reference in new issue