Browse Source

test subtitle directive

pull/16122/head
Barış Can Yılmaz 3 years ago
parent
commit
e513481bf0
  1. 22
      npm/ng-packs/packages/theme-shared/src/lib/tests/card-subtitle.directive.spec.ts

22
npm/ng-packs/packages/theme-shared/src/lib/tests/card-subtitle.directive.spec.ts

@ -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…
Cancel
Save