moved up to 5

This commit is contained in:
Ken
2019-02-28 22:13:40 -08:00
parent b19973652a
commit a00a1b237a
12 changed files with 108 additions and 99 deletions

View File

@@ -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

View File

@@ -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>

View 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

View File

@@ -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>