Skip to content

Commit

Permalink
nextjs jest config
Browse files Browse the repository at this point in the history
  • Loading branch information
kolodny committed Feb 29, 2024
1 parent ed5ca7e commit 7c08abe
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions examples/next-app/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { Config } from 'jest';
import nextJest from 'next/jest.js';

const createJestConfig = nextJest({ dir: './' });

const config: Config = { testEnvironment: 'node' };

// createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async
export default createJestConfig(config);

0 comments on commit 7c08abe

Please sign in to comment.