refactor(e2e): extract shared vitest config and add forceExit to prevent zombie workers
This commit is contained in:
parent
ba8e90318c
commit
dd58783f5e
16
vitest.config.e2e.base.ts
Normal file
16
vitest.config.e2e.base.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import { UserConfig } from 'vitest/config';
|
||||
|
||||
export const e2eBaseTestConfig: UserConfig['test'] = {
|
||||
environment: 'node',
|
||||
globals: false,
|
||||
testTimeout: 240000,
|
||||
hookTimeout: 60000,
|
||||
teardownTimeout: 30000,
|
||||
forceExit: true,
|
||||
pool: 'threads',
|
||||
poolOptions: {
|
||||
threads: {
|
||||
singleThread: true,
|
||||
},
|
||||
},
|
||||
};
|
||||
@ -1,7 +1,9 @@
|
||||
import { defineConfig } from 'vitest/config';
|
||||
import { e2eBaseTestConfig } from './vitest.config.e2e.base';
|
||||
|
||||
export default defineConfig({
|
||||
test: {
|
||||
...e2eBaseTestConfig,
|
||||
include: [
|
||||
'e2e/specs/direct-task.e2e.ts',
|
||||
'e2e/specs/pipeline-skip-git.e2e.ts',
|
||||
@ -34,16 +36,5 @@ export default defineConfig({
|
||||
'e2e/specs/quiet-mode.e2e.ts',
|
||||
'e2e/specs/task-content-file.e2e.ts',
|
||||
],
|
||||
environment: 'node',
|
||||
globals: false,
|
||||
testTimeout: 240000,
|
||||
hookTimeout: 60000,
|
||||
teardownTimeout: 30000,
|
||||
pool: 'threads',
|
||||
poolOptions: {
|
||||
threads: {
|
||||
singleThread: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
import { defineConfig } from 'vitest/config';
|
||||
import { e2eBaseTestConfig } from './vitest.config.e2e.base';
|
||||
|
||||
export default defineConfig({
|
||||
test: {
|
||||
...e2eBaseTestConfig,
|
||||
include: [
|
||||
'e2e/specs/add-and-run.e2e.ts',
|
||||
'e2e/specs/worktree.e2e.ts',
|
||||
@ -9,16 +11,5 @@ export default defineConfig({
|
||||
'e2e/specs/github-issue.e2e.ts',
|
||||
'e2e/specs/structured-output.e2e.ts',
|
||||
],
|
||||
environment: 'node',
|
||||
globals: false,
|
||||
testTimeout: 240000,
|
||||
hookTimeout: 60000,
|
||||
teardownTimeout: 30000,
|
||||
pool: 'threads',
|
||||
poolOptions: {
|
||||
threads: {
|
||||
singleThread: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@ -1,20 +1,11 @@
|
||||
import { defineConfig } from 'vitest/config';
|
||||
import { e2eBaseTestConfig } from './vitest.config.e2e.base';
|
||||
|
||||
export default defineConfig({
|
||||
test: {
|
||||
...e2eBaseTestConfig,
|
||||
include: [
|
||||
'e2e/specs/structured-output.e2e.ts',
|
||||
],
|
||||
environment: 'node',
|
||||
globals: false,
|
||||
testTimeout: 240000,
|
||||
hookTimeout: 60000,
|
||||
teardownTimeout: 30000,
|
||||
pool: 'threads',
|
||||
poolOptions: {
|
||||
threads: {
|
||||
singleThread: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@ -1,18 +1,9 @@
|
||||
import { defineConfig } from 'vitest/config';
|
||||
import { e2eBaseTestConfig } from './vitest.config.e2e.base';
|
||||
|
||||
export default defineConfig({
|
||||
test: {
|
||||
...e2eBaseTestConfig,
|
||||
include: ['e2e/specs/**/*.e2e.ts'],
|
||||
environment: 'node',
|
||||
globals: false,
|
||||
testTimeout: 240000,
|
||||
hookTimeout: 60000,
|
||||
teardownTimeout: 30000,
|
||||
pool: 'threads',
|
||||
poolOptions: {
|
||||
threads: {
|
||||
singleThread: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user