Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 63e39b7

Browse filesBrowse files
committed
fix(playwright): bump windows timeout
1 parent 44f6bd3 commit 63e39b7
Copy full SHA for 63e39b7

2 files changed

+15-9Lines changed: 15 additions & 9 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/playwright.ts‎

Copy file name to clipboardExpand all lines: src/playwright.ts
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
import defu from 'defu'
22
import { test as base } from '@playwright/test'
33
import type { Page, Response } from 'playwright-core'
4+
import { isWindows } from 'std-env'
45
import type { GotoOptions, TestOptions as SetupOptions, TestHooks } from './e2e'
56
import { createTest, url, waitForHydration } from './e2e'
67

8+
const FIXTURE_TIMEOUT = isWindows ? 120_000 : 60_000
9+
710
export type ConfigOptions = {
811
nuxt: Partial<SetupOptions> | undefined
912
defaults: {
@@ -44,7 +47,7 @@ export const test = base.extend<TestOptions, WorkerOptions & ConfigOptions>({
4447
await hooks.beforeAll()
4548
await use(hooks)
4649
await hooks.afterAll()
47-
}, { scope: 'worker' },
50+
}, { scope: 'worker', timeout: FIXTURE_TIMEOUT },
4851
],
4952
baseURL: async ({ _nuxtHooks }, use) => {
5053
_nuxtHooks.beforeEach()
Collapse file

‎test/unit/resolve-config.spec.ts‎

Copy file name to clipboardExpand all lines: test/unit/resolve-config.spec.ts
+11-8Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ import type { Vitest } from 'vitest/node'
88

99
type VitestCliOptions = Parameters<typeof createVitest>[1]
1010

11+
// Increase timeout for CI environments (especially Windows) where Nuxt build can be slow
12+
const TEST_TIMEOUT = process.env.CI ? 60_000 : 10_000
13+
1114
describe('resolve config', () => {
1215
describe('basic', async () => {
1316
const expected = {
@@ -21,13 +24,13 @@ describe('resolve config', () => {
2124

2225
it('all', async () => {
2326
expect(await globTestSpecifications('../fixtures/basic')).toEqual(expected)
24-
})
27+
}, TEST_TIMEOUT)
2528

2629
it('spcific root', async () => {
2730
expect(await globTestSpecifications('./', {
2831
root: '../fixtures/basic',
2932
})).toEqual(expected)
30-
})
33+
}, TEST_TIMEOUT)
3134
})
3235

3336
describe('project', async () => {
@@ -42,19 +45,19 @@ describe('resolve config', () => {
4245

4346
it('all', async () => {
4447
expect(await globTestSpecifications('../fixtures/project')).toEqual(expected)
45-
})
48+
}, TEST_TIMEOUT)
4649

4750
it('only spcific project', async () => {
4851
expect(await globTestSpecifications('../fixtures/project', {
4952
project: 'nuxt',
5053
})).toEqual({ nuxt: expected.nuxt })
51-
})
54+
}, TEST_TIMEOUT)
5255

5356
it('spcific root', async () => {
5457
expect(await globTestSpecifications('./', {
5558
root: '../fixtures/project',
5659
})).toEqual(expected)
57-
})
60+
}, TEST_TIMEOUT)
5861
})
5962

6063
describe('override', () => {
@@ -75,7 +78,7 @@ describe('resolve config', () => {
7578

7679
it('all', async () => {
7780
expect(await globTestSpecifications('../fixtures/override')).toEqual(expected)
78-
})
81+
}, TEST_TIMEOUT)
7982

8083
it('only spcific project', async () => {
8184
expect(await globTestSpecifications('../fixtures/override', {
@@ -84,13 +87,13 @@ describe('resolve config', () => {
8487
nuxt1: expected.nuxt1,
8588
nuxt2: expected.nuxt2,
8689
})
87-
})
90+
}, TEST_TIMEOUT)
8891

8992
it('spcific root', async () => {
9093
expect(await globTestSpecifications('./', {
9194
root: '../fixtures/override',
9295
})).toEqual(expected)
93-
})
96+
}, TEST_TIMEOUT)
9497
})
9598
})
9699

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.