Skip to content

Commit 1dfaf48

Browse files
committed
Add README.md
1 parent 4bb7ab7 commit 1dfaf48

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

examples/with-jest/README.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Example app using Jest to run tests
2+
3+
This example features:
4+
5+
* A properly configured Next.js app for Jest
6+
* An example test written with Jest Snapshot Testing
7+
* An example test written with Enzyme
8+
9+
## How to run it
10+
11+
```sh
12+
npm install
13+
npm run dev
14+
```
15+
16+
## Jest related info
17+
18+
After you've added `jest-cli` and `jest-babel` into your app, make sure to add the following `.babelrc` file.
19+
20+
```json
21+
{
22+
"presets": ["next/babel"]
23+
}
24+
```
25+
26+
It'll ask Jest to use the babel configurations used by Next.js.

0 commit comments

Comments
 (0)