Skip to content

Commit

Permalink
test: split up long test file
Browse files Browse the repository at this point in the history
  • Loading branch information
bmish committed Nov 18, 2022
1 parent e237809 commit 84e1ba7
Show file tree
Hide file tree
Showing 42 changed files with 5,683 additions and 5,608 deletions.
13 changes: 12 additions & 1 deletion jest.config.cjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/* eslint filenames/match-exported:"off" -- trouble matching given period in filename */
// https://kulshekhar.github.io/ts-jest/docs/guides/esm-support/

/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = {
const jestConfig = {
preset: 'ts-jest/presets/default-esm',
testEnvironment: 'node',
testMatch: ['<rootDir>/test/**/*-test.ts'],
Expand All @@ -22,3 +23,13 @@ module.exports = {
},
},
};

if (process.version.startsWith('v14')) {
// TODO: remove this workaround after dropping support for Node 14.
// Use number greater than number of tests to avoid: "You are trying to `import` a file after the Jest environment has been torn down."
// https://github.com/facebook/jest/issues/11438#issuecomment-954155180
jestConfig.maxConcurrency = 999;
jestConfig.maxWorkers = 999;
}

module.exports = jestConfig;

0 comments on commit 84e1ba7

Please sign in to comment.