-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvitest.visual.config.mjs
More file actions
45 lines (44 loc) · 938 Bytes
/
Copy pathvitest.visual.config.mjs
File metadata and controls
45 lines (44 loc) · 938 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import { playwright } from "@vitest/browser-playwright";
import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
include: ["tests/visual/**/*.test.{js,mjs}"],
fileParallelism: false,
testTimeout: 60000,
browser: {
enabled: true,
provider: playwright({
launchOptions: {
headless: true,
},
}),
headless: true,
viewport: {
width: 1100,
height: 720,
},
screenshotFailures: true,
instances: [
{
browser: "chromium",
},
],
api: {
host: "127.0.0.1",
},
expect: {
toMatchScreenshot: {
comparatorName: "pixelmatch",
comparatorOptions: {
allowedMismatchedPixelRatio: 0.002,
threshold: 0.1,
},
},
},
},
},
server: {
host: "127.0.0.1",
strictPort: true,
},
});