Skip to content

Commit 05832e4

Browse files
committed
Changes to get vite testing to pass
1 parent 3d3897f commit 05832e4

File tree

3 files changed

+124
-5
lines changed

3 files changed

+124
-5
lines changed

package-lock.json

Lines changed: 116 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@
6161
"@types/react-syntax-highlighter": "^15.5.13",
6262
"@types/semver": "^7.7.0",
6363
"@vitejs/plugin-react": "^5.0.4",
64+
"@vitest/browser": "^4.0.8",
65+
"@vitest/browser-playwright": "^4.0.8",
6466
"autoprefixer": "^10.4.21",
6567
"playwright": "^1.54.1",
6668
"postcss": "^8.5.6",

vite.config.mts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
/// <reference types="vitest" />
22
/// <reference types="@vitest/browser/matchers" />
3-
import { defineConfig } from "vite";
3+
import { defineConfig } from "vitest/config";
44
import { viteStaticCopy } from "vite-plugin-static-copy";
5+
import { playwright } from '@vitest/browser-playwright'
56
import react from "@vitejs/plugin-react";
67
import tsconfigPaths from "vite-tsconfig-paths";
78

@@ -29,12 +30,13 @@ export default defineConfig({
2930
},
3031
test: {
3132
setupFiles: ['./tests/setupTests.ts'],
32-
3333
browser: {
34-
provider: "playwright",
3534
enabled: true,
36-
instances: [{ browser: "chromium" }],
35+
provider: playwright(),
3736
headless: true,
37+
instances: [
38+
{ browser: 'chromium' },
39+
]
3840
},
3941
},
4042
});

0 commit comments

Comments
 (0)