diff --git a/jest.config.js b/jest.config.js index 8eed1dd1..44abf35b 100644 --- a/jest.config.js +++ b/jest.config.js @@ -25,6 +25,8 @@ module.exports = { // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader modulePathIgnorePatterns: ['/lib/', '/dist/'], + // Files that will be run before Jest is loaded to set globals like fetch + setupFiles: ['/src/jest.globals.ts'], // A list of paths to modules that run some code to configure or set up the testing framework after the environment is ready - setupFilesAfterEnv: ['/src/jest.globals.ts', '/src/jest.setup.ts'], + setupFilesAfterEnv: ['/src/jest.setup.ts'], }; diff --git a/src/test-utils/cloud-runner-test-helpers.ts b/src/test-utils/cloud-runner-test-helpers.ts index 74fb9c9d..4fd6bba6 100644 --- a/src/test-utils/cloud-runner-test-helpers.ts +++ b/src/test-utils/cloud-runner-test-helpers.ts @@ -6,5 +6,6 @@ export const TIMEOUT_INFINITE = 1e9; export async function createParameters(overrides?: OptionValues) { if (overrides) Cli.options = overrides; + return BuildParameters.create(); }