mirror of
https://github.com/microsoft/frontend-bootcamp.git
synced 2026-01-26 14:56:42 +08:00
moved up to 5
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Step 2.4: Testing TypeScript code with Jest
|
||||
# Step 2.4: Testing TypeScript code with Jest (Demo)
|
||||
|
||||
[Lessons](../) | [Exercise](./exercise/) | [Demo](./demo/)
|
||||
|
||||
@@ -126,19 +126,3 @@ Take a look at code inside `demo/src`:
|
||||
3. `index.spec.ts` is the test file
|
||||
|
||||
Note how tests are re-run when either test files or source files under `src` are saved.
|
||||
|
||||
# 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
|
||||
@@ -4,7 +4,7 @@
|
||||
<link rel="stylesheet" href="../../assets/step.css" />
|
||||
</head>
|
||||
<body class="ms-Fabric">
|
||||
<div id="markdownReadme"></div>
|
||||
<div id="markdownReadme" data-src="./README.md"></div>
|
||||
<div id="app">
|
||||
For this step, we look at unit testing. Run
|
||||
<pre>npm test</pre>
|
||||
|
||||
19
step2-04/exercise/README.md
Normal file
19
step2-04/exercise/README.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# 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
|
||||
@@ -4,7 +4,7 @@
|
||||
<link rel="stylesheet" href="../../assets/step.css" />
|
||||
</head>
|
||||
<body class="ms-Fabric">
|
||||
<div id="markdownReadme"></div>
|
||||
<div id="markdownReadme" class="exercise" data-src="./README.md"></div>
|
||||
<div id="app">
|
||||
For this step, we look at unit testing. Run
|
||||
<pre>npm test</pre>
|
||||
|
||||
Reference in New Issue
Block a user