fix: load fetch polyfill before tests

pull/724/head
Frostebite 2025-08-05 20:38:10 +01:00
parent 203ecf61e4
commit 40757da35b
2 changed files with 4 additions and 1 deletions

View File

@ -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: ['<rootDir>/lib/', '<rootDir>/dist/'],
// Files that will be run before Jest is loaded to set globals like fetch
setupFiles: ['<rootDir>/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: ['<rootDir>/src/jest.globals.ts', '<rootDir>/src/jest.setup.ts'],
setupFilesAfterEnv: ['<rootDir>/src/jest.setup.ts'],
};

View File

@ -6,5 +6,6 @@ export const TIMEOUT_INFINITE = 1e9;
export async function createParameters(overrides?: OptionValues) {
if (overrides) Cli.options = overrides;
return BuildParameters.create();
}