Last active
October 15, 2019 15:22
-
-
Save Kjaer/f10cf953ac1b649ad1d036db79209d0f to your computer and use it in GitHub Desktop.
"Setting up Jest and Enzyme for Typescript Next.js apps" post gists
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
"testEnvironment": "node", | |
"roots": [ | |
"<rootDir>/components" | |
], | |
"preset": "ts-jest", | |
"setupFilesAfterEnv": ["<rootDir>/tests/setupTests.ts"], | |
"transform": { | |
"^.+\\.tsx?$": "ts-jest" | |
}, | |
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$", | |
"moduleFileExtensions": [ | |
"ts", | |
"tsx", | |
"js", | |
"jsx", | |
"json", | |
"node" | |
], | |
"testPathIgnorePatterns": ["<rootDir>/.next/", "<rootDir>/node_modules/"], | |
"snapshotSerializers": ["enzyme-to-json/serializer"] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment