Browse Source

test card-img-top directive

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

25
npm/ng-packs/packages/theme-shared/src/lib/tests/card-img-top.directive.spec.ts

@ -0,0 +1,25 @@
import { createHostFactory, SpectatorHost } from '@ngneat/spectator';
import { CardImgTop } from '../components';
describe('AbpCardImgTopDirective', () => {
let spectator: SpectatorHost<CardImgTop>;
const createHost = createHostFactory(CardImgTop);
beforeEach(
() =>
(spectator = createHost(
`<img
abpCardImgTop
/>`,
)),
);
it('should create an instance', () => {
expect(spectator).toBeTruthy();
});
it('should have class card-img-top', () => {
expect(spectator.element.classList).toContain('card-img-top');
});
});
Loading…
Cancel
Save