emi-challenge-fe/tests/app/shared/ui/modal/modal.spec.ts

29 lines
749 B
TypeScript

import { describe, it, expect } from 'vitest';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { Modal } from '@app/shared/ui/modal/modal';
describe('Modal', () => {
let component: Modal;
let fixture: ComponentFixture<Modal>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [Modal],
}).compileComponents();
fixture = TestBed.createComponent(Modal);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
it('should render placeholder content', () => {
const p = fixture.nativeElement.querySelector('p');
expect(p?.textContent).toContain('modal works');
});
});