Files
angular-challenges/apps/testing-input-output/src/app/counter.component.spec.ts
2023-07-13 15:28:13 +02:00

28 lines
845 B
TypeScript

import { render } from '@testing-library/angular';
import { CounterComponent } from './counter.component';
describe('CounterComponent', () => {
describe('Given an initualValue of 10', async () => {
test('Then counterValue is 10', async () => {
await render(CounterComponent);
});
describe('When clicking 5 times on increment button', async () => {
test('Then counterValue is 15', async () => {
await render(CounterComponent);
});
});
describe('When clicking 2 times on decrement button', async () => {
test('Then counterValue is 8', async () => {
await render(CounterComponent);
});
describe('When clicking on Send ', async () => {
test('Then emitted value is 8', async () => {
await render(CounterComponent);
});
});
});
});
});