2023-12-05 10:08:44 -09:00
|
|
|
import { defineConfig } from 'vitest/config'
|
2022-05-11 03:43:48 -08:00
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
|
test: {
|
2023-04-25 18:47:12 -08:00
|
|
|
dangerouslyIgnoreUnhandledErrors: true,
|
2022-05-24 03:58:02 -08:00
|
|
|
include: ['packages/**/*.test.ts'],
|
|
|
|
|
/**
|
|
|
|
|
* not to ESM ported packages
|
|
|
|
|
*/
|
|
|
|
|
exclude: [
|
2025-02-14 10:41:30 -09:00
|
|
|
'dist', '.idea', '.git', '.cache', '**/node_modules/**'
|
2022-05-12 23:42:27 -08:00
|
|
|
],
|
2023-07-31 22:10:51 -08:00
|
|
|
env: {
|
|
|
|
|
WDIO_SKIP_DRIVER_SETUP: '1'
|
|
|
|
|
},
|
2025-07-21 13:28:00 -08:00
|
|
|
// This is a measure to address Vitest errors.
|
|
|
|
|
// See also: https://github.com/vitest-dev/vitest/discussions/6511
|
|
|
|
|
pool: 'threads',
|
2022-05-11 03:43:48 -08:00
|
|
|
coverage: {
|
2024-04-19 16:40:20 -08:00
|
|
|
enabled: false,
|
2023-06-12 13:56:11 -08:00
|
|
|
provider: 'v8',
|
2023-01-03 07:12:15 -09:00
|
|
|
exclude: [
|
2023-08-11 13:17:49 -08:00
|
|
|
'**/__mocks__/**',
|
2023-01-03 07:12:15 -09:00
|
|
|
'**/build/**',
|
2023-08-11 13:17:49 -08:00
|
|
|
'**/cjs/*.ts',
|
2023-01-03 07:12:15 -09:00
|
|
|
'**/*.test.ts',
|
2023-11-09 14:54:45 -09:00
|
|
|
'packages/webdriver/src/bidi/handler.ts'
|
2023-01-03 07:12:15 -09:00
|
|
|
],
|
2023-12-05 10:08:44 -09:00
|
|
|
watermarks: {
|
|
|
|
|
statements: [85, 90],
|
|
|
|
|
functions: [83, 88],
|
|
|
|
|
branches: [85, 90],
|
|
|
|
|
lines: [85, 90]
|
|
|
|
|
}
|
2024-02-13 16:37:17 -09:00
|
|
|
},
|
|
|
|
|
setupFiles: [
|
|
|
|
|
'__mocks__/fetch.ts'
|
|
|
|
|
]
|
2022-05-11 03:43:48 -08:00
|
|
|
}
|
|
|
|
|
})
|