Skip to content

Commit 0c1a7dd

Browse files
committed
update vitest config
1 parent f5246dd commit 0c1a7dd

File tree

4 files changed

+19
-9
lines changed

4 files changed

+19
-9
lines changed

convex/example.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { api } from "./_generated/api";
22
import { ConvexTestingHelper } from "convex-helpers/testing";
33

4-
// Un-skip this test to run end-to-end tests. Also see vitest.config.mts.
5-
describe.skip("testingExample", () => {
4+
describe("testingExample", () => {
65
let t: ConvexTestingHelper;
76

87
beforeEach(() => {

convex/vitest.config.mts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { defineConfig } from "vitest/config";
2+
3+
// https://vitejs.dev/config/
4+
export default defineConfig({
5+
test: {
6+
environment: "edge-runtime",
7+
exclude: [],
8+
passWithNoTests: true,
9+
10+
// Only run one suite at a time because all of our tests are running against
11+
// the same backend and we don't want to leak state.
12+
maxWorkers: 1,
13+
minWorkers: 1,
14+
globals: true,
15+
},
16+
});

vite.config.mts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,8 @@ export default defineConfig({
66
plugins: [react()],
77
test: {
88
environment: "jsdom",
9-
exclude: ["**/node_modules/**", "packages/**/dist/**"],
10-
passWithNoTests: true,
9+
exclude: ["node_modules/**", "convex/**", "packages/**"],
1110

12-
// For the end-to-end tests, uncomment these lines
13-
// Only run one suite at a time because all of our tests are running against
14-
// the same backend and we don't want to leak state.
15-
// maxWorkers: 1,
16-
// minWorkers: 1,
1711
globals: true,
1812
},
1913
});

vitest.workspace.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export default [".", "packages/convex-helpers"];

0 commit comments

Comments
 (0)