mirror of
https://github.com/microsoft/frontend-bootcamp.git
synced 2026-01-26 14:56:42 +08:00
20 lines
524 B
Markdown
20 lines
524 B
Markdown
# Step 2.4: Testing TypeScript code with Jest (Exercise)
|
|
|
|
[Lessons](../) | [Exercise](./exercise/) | [Demo](./demo/)
|
|
|
|
# Exercise
|
|
|
|
Start the test runner by running `npm test` in the root of the `frontend-bootcamp` folder.
|
|
|
|
## Basic testing
|
|
|
|
1. Look at `exercise/src/stack.ts` for a sample implementation of a stack
|
|
|
|
2. Follow the instructions inside `stack.spec.ts` file to complete the two tests
|
|
|
|
## Enzyme Testing
|
|
|
|
1. Open up `exercise/src/TestMe.spec.tsx`
|
|
|
|
2. Fill in the test using Enzyme concepts introduced in the demo
|