Skip to content

Commit

Permalink
test: set global hookTimeout (#8119)
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev committed May 11, 2022
1 parent e10b56f commit 68459fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion playground/vitestSetup.ts
Expand Up @@ -200,7 +200,7 @@ beforeAll(async (s) => {
throw beforeAllError
}
}
}, 30000)
})

function startStaticServer(config?: InlineConfig): Promise<string> {
if (!config) {
Expand Down
5 changes: 4 additions & 1 deletion vitest.config.e2e.ts
@@ -1,6 +1,8 @@
import { resolve } from 'path'
import { defineConfig } from 'vitest/config'

const timeout = process.env.CI ? 50000 : 30000

export default defineConfig({
resolve: {
alias: {
Expand All @@ -11,7 +13,8 @@ export default defineConfig({
include: ['./playground/**/*.spec.[tj]s'],
setupFiles: ['./playground/vitestSetup.ts'],
globalSetup: ['./playground/vitestGlobalSetup.ts'],
testTimeout: process.env.CI ? 50000 : 20000,
testTimeout: timeout,
hookTimeout: timeout,
globals: true,
reporters: 'dot',
onConsoleLog(log) {
Expand Down

0 comments on commit 68459fb

Please sign in to comment.