Files
angular-challenges/apps/testing-nested/src/app/child.component.spec.ts
2023-07-13 15:48:16 +02:00

17 lines
598 B
TypeScript

import { render } from '@testing-library/angular';
import { ChildComponent } from './child.component';
describe('ChildComponent', () => {
describe('When typing nothing and clicking on Validate', () => {
test('Then show "Title is required" error message and no http request has been sent', async () => {
await render(ChildComponent);
});
});
describe('When typing "Good" and clicking on Validate', () => {
test('Then show "Title is Good" message, no error message and send a http request to the backend', async () => {
await render(ChildComponent);
});
});
});