what: - runs module and api integration tests in matrix strategy - v28 of jest comes with sharding support, which we can utilize when we upgrade - splits the tests by number of matrix jobs and run them in parallel - This introduced some flakiness in some specs, but couldn't reproduce locally. Those have been skipped for now. - uses swc/jest for added performance - Locally, a chunk took 90 seconds with babel and 30 seconds with swc. - This translated to 2 mins saved per shard in CI, but haven't tested this enough.
25 lines
537 B
JavaScript
25 lines
537 B
JavaScript
// API
|
|
process.chdir(__dirname)
|
|
|
|
module.exports = {
|
|
name: "api",
|
|
testEnvironment: `node`,
|
|
rootDir: "./",
|
|
testTimeout: 10000,
|
|
testPathIgnorePatterns: [
|
|
`/examples/`,
|
|
`/www/`,
|
|
`/dist/`,
|
|
`/node_modules/`,
|
|
`__tests__/fixtures`,
|
|
`__testfixtures__`,
|
|
`.cache`,
|
|
],
|
|
transformIgnorePatterns: [`/dist`],
|
|
transform: { "^.+\\.[jt]s$": ["@swc/jest"] },
|
|
setupFiles: ["../setup-env.js"],
|
|
setupFilesAfterEnv: ["../setup.js"],
|
|
globalSetup: "../globalSetup.js",
|
|
globalTeardown: "../globalTeardown.js",
|
|
}
|