blob: 05cee6be6a5565ea8d4763f41afd92a3e81bd06c [file] [log] [blame]
/**
* @license
* Copyright 2021 The Go Authors. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
let config = {
preset: 'ts-jest',
globals: {
'ts-jest': {
isolatedModules: true,
},
},
moduleFileExtensions: ['ts', 'js'],
testRunner: 'jest-circus/runner',
};
// eslint-disable-next-line no-undef
const e2e = process.argv.some(arg => arg.includes('e2e'));
if (e2e) {
config = {
...config,
setupFilesAfterEnv: ['<rootDir>/e2e/setup.ts'],
testEnvironment: '<rootDir>/e2e/test-environment.js',
testTimeout: 60000,
};
}
// eslint-disable-next-line no-undef
module.exports = config;