2020-02-03 20:36:55 +01:00
|
|
|
# Next.js + Jest
|
2016-12-22 22:04:32 +01:00
|
|
|
|
2020-02-03 20:36:55 +01:00
|
|
|
This example shows how to configure Jest to work with Next.js.
|
2020-01-16 23:23:56 +01:00
|
|
|
|
2020-02-03 20:36:55 +01:00
|
|
|
This includes Next.js' built-in support for Global CSS, CSS Modules, and TypeScript!
|
2016-12-22 22:04:32 +01:00
|
|
|
|
2020-02-03 20:36:55 +01:00
|
|
|
## How to Use
|
2017-12-03 05:30:17 +01:00
|
|
|
|
2020-05-27 23:51:11 +02:00
|
|
|
Quickly get started using [Create Next App](https://github.com/vercel/next.js/tree/canary/packages/create-next-app#readme)!
|
2017-12-03 05:30:17 +01:00
|
|
|
|
2020-02-03 20:36:55 +01:00
|
|
|
In your terminal, run the following command:
|
2016-12-22 22:04:32 +01:00
|
|
|
|
|
|
|
```bash
|
2020-02-03 20:36:55 +01:00
|
|
|
npx create-next-app --example with-jest
|
2018-04-03 14:19:05 +02:00
|
|
|
```
|
|
|
|
|
2020-02-03 20:36:55 +01:00
|
|
|
## Run Jest Tests
|
2018-04-03 14:19:05 +02:00
|
|
|
|
|
|
|
```bash
|
2020-02-03 20:36:55 +01:00
|
|
|
npm test
|
2016-12-22 22:04:32 +01:00
|
|
|
```
|