2021-03-10 06:35:34 +07:00
|
|
|
// jest.config.ts
|
|
|
|
import type { Config } from "@jest/types"
|
|
|
|
|
|
|
|
const config: Config.InitialOptions = {
|
2021-03-31 00:30:38 +07:00
|
|
|
preset: "jest-playwright-preset",
|
2021-03-10 06:35:34 +07:00
|
|
|
transform: {
|
|
|
|
"^.+\\.ts$": "<rootDir>/node_modules/ts-jest",
|
|
|
|
},
|
|
|
|
globalSetup: "<rootDir>/utils/globalSetup.ts",
|
2021-03-31 00:35:18 +07:00
|
|
|
testEnvironmentOptions: {
|
|
|
|
"jest-playwright": {
|
2021-03-31 06:07:51 +07:00
|
|
|
// TODO(@jsjoeio) enable on webkit and firefox
|
|
|
|
// waiting on next playwright release
|
|
|
|
// - https://github.com/microsoft/playwright/issues/6009#event-4536210890
|
|
|
|
// - https://github.com/microsoft/playwright/issues/6020
|
|
|
|
browsers: ["chromium"],
|
2021-03-31 02:24:51 +07:00
|
|
|
// If there's a page error, we don't exit
|
|
|
|
// i.e. something logged in the console
|
|
|
|
exitOnPageError: false,
|
|
|
|
contextOptions: {
|
|
|
|
recordVideo: {
|
|
|
|
dir: "./test/e2e/videos",
|
|
|
|
},
|
|
|
|
},
|
2021-03-31 00:35:18 +07:00
|
|
|
},
|
|
|
|
},
|
2021-03-17 04:43:29 +07:00
|
|
|
testPathIgnorePatterns: ["/node_modules/", "/lib/", "/out/", "test/unit"],
|
2021-03-10 06:35:34 +07:00
|
|
|
testTimeout: 30000,
|
|
|
|
modulePathIgnorePatterns: [
|
|
|
|
"<rootDir>/../lib/vscode",
|
|
|
|
"<rootDir>/../release-packages",
|
|
|
|
"<rootDir>/../release",
|
|
|
|
"<rootDir>/../release-standalone",
|
|
|
|
"<rootDir>/../release-npm-package",
|
|
|
|
"<rootDir>/../release-gcp",
|
|
|
|
"<rootDir>/../release-images",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
export default config
|