Skip to content

Commit f4ed133

Browse files
authored
vitest.projects.ts has been deprecated (#1297)
1 parent 344dd9d commit f4ed133

File tree

2 files changed

+59
-59
lines changed

2 files changed

+59
-59
lines changed

vitest.config.ts

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import tsconfigPaths from 'vite-tsconfig-paths';
22
import { defineConfig } from 'vitest/config';
3+
import { timeout as testTimeout } from './internal/e2e/src/timeout';
4+
import { boolEnv, isCI, isNotPlatform } from './internal/testing/src/env';
35

46
// By default, Vite bypasses node_packages to native Node; meaning, imports to
57
// packages that match the tsconfig paths wont work because Node will require the
@@ -10,10 +12,66 @@ const inline = [/@graphql-mesh\/.*/, /@omnigraph\/.*/];
1012

1113
export default defineConfig({
1214
plugins: [tsconfigPaths()],
13-
test: { server: { deps: { inline } } },
1415
resolve: {
1516
alias: {
1617
graphql: 'graphql/index.js', // TODO: why duplicate graphql errors when there's no multiple graphqls installed? mistery
1718
},
1819
},
20+
test: {
21+
server: { deps: { inline } },
22+
projects: [
23+
{
24+
extends: true,
25+
test: {
26+
name: 'unit',
27+
include: ['**/*.(test|spec).ts'],
28+
},
29+
},
30+
{
31+
extends: true,
32+
test: {
33+
name: 'e2e',
34+
include: [
35+
'**/*.e2e.ts',
36+
...(isCI() && isNotPlatform('linux')
37+
? [
38+
// TODO: containers are not starting on non-linux environments
39+
'!**/e2e/auto-type-merging',
40+
'!**/e2e/neo4j-example',
41+
'!**/e2e/soap-demo',
42+
'!**/e2e/mysql-employees',
43+
'!**/e2e/opentelemetry',
44+
'!**/e2e/graphos-polling',
45+
]
46+
: []),
47+
],
48+
hookTimeout: testTimeout,
49+
testTimeout,
50+
retry: boolEnv('CI') ? 3 : 0,
51+
},
52+
},
53+
{
54+
extends: true,
55+
test: {
56+
name: 'bench',
57+
hookTimeout: testTimeout,
58+
testTimeout,
59+
benchmark: {
60+
include: ['bench/**/*.bench.ts', 'e2e/**/*.bench.ts'],
61+
reporters: ['verbose'],
62+
outputJson: 'bench/results.json',
63+
},
64+
},
65+
},
66+
{
67+
extends: true,
68+
test: {
69+
name: 'memtest',
70+
include: ['**/*.memtest.ts'],
71+
hookTimeout: testTimeout,
72+
testTimeout,
73+
},
74+
},
75+
],
76+
},
1977
});

vitest.projects.ts

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)