-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.e2e.config.js
More file actions
47 lines (42 loc) · 1.13 KB
/
vitest.e2e.config.js
File metadata and controls
47 lines (42 loc) · 1.13 KB
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
46
47
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* Configuration for E2E tests only (tests directory in project root).
* @type {import('vite').UserConfig}
* @see https://vitest.dev/config/
*/
const config = {
test: {
/**
* Only include test files in the root tests directory for E2E tests.
*/
include: ['tests/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
/**
* The default timeout of 5000ms is sometimes not enough for playwright.
*/
testTimeout: 30_000,
hookTimeout: 30_000,
/**
* Environment configuration for hardware mocking.
* Sets NODE_ENV to 'test' to ensure mock hardware implementations are used.
*/
env: {
NODE_ENV: 'test',
},
/**
* Run E2E tests sequentially to avoid Electron process conflicts.
* Multiple Electron instances can't be launched simultaneously.
*/
pool: 'forks',
poolOptions: {
forks: {
singleFork: true,
},
},
},
};
export default config;