forked from OAI/OpenAPI-Specification
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.mjs
More file actions
20 lines (19 loc) · 766 Bytes
/
vitest.config.mjs
File metadata and controls
20 lines (19 loc) · 766 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { defineConfig } from 'vitest/config'
import { jsonSchemaCoveragePlugin } from "@hyperjump/json-schema-coverage/vitest"
export default defineConfig({
plugins: [jsonSchemaCoveragePlugin()],
test: {
globalSetup: ["tests/schema/oas-schema.mjs"],
coverage: {
include: ["src/schemas/validation/**/*.yaml"],
thresholds: process.env.BASE !== "dev" ? {
statements: 100, // JSON Schema keywords
lines: 100,
// functions: 100, // subschemas, for example with `properties` - to be discussed
// branches: 56.77, // branch coverage isn't that useful
} : {}
},
forceRerunTriggers: ['**/scripts/**', '**/tests/**'],
testTimeout: 20000, // 20 seconds, sometimes needed on slower machines
},
})