diff --git a/packages/test-utils/src/context.ts b/packages/test-utils/src/context.ts index ad987d1ec9..0e8da939e7 100644 --- a/packages/test-utils/src/context.ts +++ b/packages/test-utils/src/context.ts @@ -9,7 +9,7 @@ export function createTestContext (options: Partial): TestContext { testDir: resolve(process.cwd(), 'test'), fixture: 'fixture', configFile: 'nuxt.config', - setupTimeout: 60000, + setupTimeout: 120 * 1000, dev: !!JSON.parse(process.env.NUXT_TEST_DEV || 'false'), logLevel: 1, server: true, diff --git a/packages/test-utils/src/setup/jest.ts b/packages/test-utils/src/setup/jest.ts index 01a9f65438..b982e95247 100644 --- a/packages/test-utils/src/setup/jest.ts +++ b/packages/test-utils/src/setup/jest.ts @@ -8,7 +8,7 @@ export default async function setupJest (hooks: TestHooks) { // TODO: add globals existing check to provide better error message // @ts-expect-error jest types - test('setup', hooks.setup, 120 * 1000) + test('setup', hooks.setup, hooks.ctx.options.setupTimeout) // @ts-expect-error jest types beforeEach(hooks.beforeEach) // @ts-expect-error jest types diff --git a/packages/test-utils/src/setup/vitest.ts b/packages/test-utils/src/setup/vitest.ts index 5fa16f6d9e..d55ece3438 100644 --- a/packages/test-utils/src/setup/vitest.ts +++ b/packages/test-utils/src/setup/vitest.ts @@ -5,7 +5,7 @@ export default async function setupVitest (hooks: TestHooks) { hooks.ctx.mockFn = vitest.vi.fn - vitest.beforeAll(hooks.setup, 120 * 1000) + vitest.beforeAll(hooks.setup, hooks.ctx.options.setupTimeout) vitest.beforeEach(hooks.beforeEach) vitest.afterEach(hooks.afterEach) vitest.afterAll(hooks.afterAll)