2019-12-22 14:05:15 +00:00
|
|
|
module.exports = {
|
2022-03-27 23:23:32 +00:00
|
|
|
// Automatically clear mock calls and instances between every test
|
2021-03-13 23:44:01 +00:00
|
|
|
clearMocks: true,
|
2022-03-27 23:23:32 +00:00
|
|
|
|
|
|
|
// An array of file extensions your modules use
|
2021-03-13 23:44:01 +00:00
|
|
|
moduleFileExtensions: ['js', 'ts'],
|
2022-03-27 23:23:32 +00:00
|
|
|
|
|
|
|
// The test environment that will be used for testing
|
2019-12-22 14:05:15 +00:00
|
|
|
testEnvironment: 'node',
|
2022-03-27 23:23:32 +00:00
|
|
|
|
|
|
|
// The glob patterns Jest uses to detect test files
|
2021-03-13 23:44:01 +00:00
|
|
|
testMatch: ['**/*.test.ts'],
|
2022-03-27 23:23:32 +00:00
|
|
|
|
|
|
|
// This option allows use of a custom test runner
|
2021-03-13 23:44:01 +00:00
|
|
|
testRunner: 'jest-circus/runner',
|
2022-03-27 23:23:32 +00:00
|
|
|
|
|
|
|
// A map with regular expressions for transformers to paths
|
2021-03-13 23:44:01 +00:00
|
|
|
transform: {
|
|
|
|
'^.+\\.ts$': 'ts-jest',
|
|
|
|
},
|
2022-03-27 23:23:32 +00:00
|
|
|
|
|
|
|
// Indicates whether each individual test should be reported during the run
|
2021-03-13 23:44:01 +00:00
|
|
|
verbose: true,
|
2022-03-27 23:23:32 +00:00
|
|
|
|
|
|
|
// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
|
|
|
|
modulePathIgnorePatterns: ['<rootDir>/lib/', '<rootDir>/dist/'],
|
|
|
|
|
2025-06-11 14:56:27 +00:00
|
|
|
// Use jest.setup.js to polyfill fetch for all tests
|
|
|
|
setupFiles: ['<rootDir>/jest.setup.js'],
|
2019-12-22 14:05:15 +00:00
|
|
|
};
|