5. Add simple test
Delete the default tests made by the Angular CLI
**src/app/app.component.spec.ts
Add a
describe
block.
src/app/app.component.spec.ts
Add a
it
block.
src/app/app.component.spec.ts
Add an expectation.
src/app/app.component.spec.ts
Run the test with Karma test runner
In the terminal at the path of the project start the unit tests with the following command
Figure: Karma output in terminal
Last updated