Skip to content

Instantly share code, notes, and snippets.

@szerintedmi
Created April 19, 2021 17:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save szerintedmi/fcbafd565ad9d580ed3dec6020d05996 to your computer and use it in GitHub Desktop.
Save szerintedmi/fcbafd565ad9d580ed3dec6020d05996 to your computer and use it in GitHub Desktop.
jest.config.js : TypeScript with jest-environment-puppeteer
/* Setup with ts-jest preset then overwrite the rest with jest-environment-puppeteer
* so we can use typescript for puppeteer tests.
*/
module.exports = {
preset: "ts-jest",
globalSetup: "jest-environment-puppeteer/setup",
globalTeardown: "jest-environment-puppeteer/teardown",
testEnvironment: "jest-environment-puppeteer",
setupFilesAfterEnv: ["expect-puppeteer"],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment