Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.

Commit dab1b11

Browse files
authored
fix(test-utils): respect setupTimeout (#7866)
1 parent d045deb commit dab1b11

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/test-utils/src/context.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export function createTestContext (options: Partial<TestOptions>): TestContext {
99
testDir: resolve(process.cwd(), 'test'),
1010
fixture: 'fixture',
1111
configFile: 'nuxt.config',
12-
setupTimeout: 60000,
12+
setupTimeout: 120 * 1000,
1313
dev: !!JSON.parse(process.env.NUXT_TEST_DEV || 'false'),
1414
logLevel: 1,
1515
server: true,

packages/test-utils/src/setup/jest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default async function setupJest (hooks: TestHooks) {
88

99
// TODO: add globals existing check to provide better error message
1010
// @ts-expect-error jest types
11-
test('setup', hooks.setup, 120 * 1000)
11+
test('setup', hooks.setup, hooks.ctx.options.setupTimeout)
1212
// @ts-expect-error jest types
1313
beforeEach(hooks.beforeEach)
1414
// @ts-expect-error jest types

packages/test-utils/src/setup/vitest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default async function setupVitest (hooks: TestHooks) {
55

66
hooks.ctx.mockFn = vitest.vi.fn
77

8-
vitest.beforeAll(hooks.setup, 120 * 1000)
8+
vitest.beforeAll(hooks.setup, hooks.ctx.options.setupTimeout)
99
vitest.beforeEach(hooks.beforeEach)
1010
vitest.afterEach(hooks.afterEach)
1111
vitest.afterAll(hooks.afterAll)

0 commit comments

Comments
 (0)