Skip to content

Commit

Permalink
Adding Jest Config to leverage NextJS 12's SWC compiler instead of babel
Browse files Browse the repository at this point in the history
  • Loading branch information
JamiesonRoberts committed Jan 4, 2022
1 parent 8824186 commit ad681e8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const nextJest = require('next/jest')

// Providing the path to your Next.js app which will enable loading next.config.js and .env files
const createJestConfig = nextJest()

// Any custom config you want to pass to Jest
const customJestConfig = {}

// createJestConfig is exported in this way to ensure that next/jest can load the Next.js configuration, which is async
module.exports = createJestConfig(customJestConfig)

0 comments on commit ad681e8

Please sign in to comment.