335e91800b
They are added to `.gitignore` already. Follow-up on #39051 ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have a helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `pnpm lint` - [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md) Co-authored-by: JJ Kasper <jj@jjsweb.site> |
||
---|---|---|
.. | ||
__mocks__ | ||
__tests__ | ||
pages | ||
public | ||
styles | ||
.eslintrc.json | ||
.gitignore | ||
jest.config.js | ||
jest.setup.js | ||
package.json | ||
README.md | ||
tsconfig.json | ||
types.d.ts |
Next.js + Jest
This example shows how to configure Jest to work with Next.js and Babel. Since the release of Next.js 12, Next.js has in-built configuration for Jest with SWC. See the with-jest example for the latest implementation.
This includes Next.js' built-in support for Global CSS, CSS Modules and TypeScript.
How to Use
Quickly get started using Create Next App!
In your terminal, run the following command:
npx create-next-app --example with-jest-babel with-jest-babel-app
yarn create next-app --example with-jest-babel with-jest-babel-app
pnpm create next-app --example with-jest-babel with-jest-babel-app
Run Jest Tests
npm test