diff --git a/package-lock.json b/package-lock.json index 61fcac0369..6a9c4f1af3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "yargs": "^18.0.0" }, "devDependencies": { - "@hyperjump/json-schema": "^1.16.1", + "@hyperjump/json-schema-coverage": "^1.1.0", "c8": "^10.1.3", "markdownlint-cli2": "^0.18.1", "vitest": "^3.2.4", @@ -482,12 +482,11 @@ } }, "node_modules/@hyperjump/browser": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@hyperjump/browser/-/browser-1.3.0.tgz", - "integrity": "sha512-bf2ZTqpjfvcEq3DAZSg1h0FuliNUddR6nDPuaPb9qNoPPBQQzD1ldtuXX0QggXKQZl0OgsI3eovGCR3Dl5kToA==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@hyperjump/browser/-/browser-1.3.1.tgz", + "integrity": "sha512-Le5XZUjnVqVjkgLYv6yyWgALat/0HpB1XaCPuCZ+GCFki9NvXloSZITIJ0H+wRW7mb9At1SxvohKBbNQbrr/cw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@hyperjump/json-pointer": "^1.1.0", "@hyperjump/uri": "^1.2.0", @@ -503,9 +502,9 @@ } }, "node_modules/@hyperjump/json-pointer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@hyperjump/json-pointer/-/json-pointer-1.1.0.tgz", - "integrity": "sha512-tFCKxMKDKK3VEdtUA3EBOS9GmSOS4mbrTjh9v3RnK10BphDMOb6+bxTh++/ae1AyfHyWb6R54O/iaoAtPMZPCg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@hyperjump/json-pointer/-/json-pointer-1.1.1.tgz", + "integrity": "sha512-M0T3s7TC2JepoWPMZQn1W6eYhFh06OXwpMqL+8c5wMVpvnCKNsPgpu9u7WyCI03xVQti8JAeAy4RzUa6SYlJLA==", "dev": true, "license": "MIT", "funding": { @@ -536,6 +535,47 @@ "@hyperjump/browser": "^1.1.0" } }, + "node_modules/@hyperjump/json-schema-coverage": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@hyperjump/json-schema-coverage/-/json-schema-coverage-1.1.0.tgz", + "integrity": "sha512-E9pwHoalb1enSVMR14iM7x0gIqdG0DzpFVHDfYGOi08DMpbhfj5q59Q5V9X8Z2PlrPn/r74ufvxkbkAOEH5djQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@hyperjump/browser": "^1.3.1", + "@hyperjump/json-schema": "^1.16.0", + "@hyperjump/uri": "^1.3.1", + "content-type": "^1.0.5", + "ignore": "^7.0.5", + "istanbul-lib-coverage": "^3.2.2", + "istanbul-lib-report": "^3.0.1", + "istanbul-reports": "^3.1.7", + "moo": "^0.5.2", + "pathe": "^2.0.3", + "picomatch": "^4.0.2", + "tinyglobby": "^0.2.14", + "vfile": "^6.0.3", + "yaml": "^2.8.0", + "yaml-unist-parser": "^2.0.5" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jdesrosiers" + } + }, + "node_modules/@hyperjump/json-schema-coverage/node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/@hyperjump/pact": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/@hyperjump/pact/-/pact-1.4.0.tgz", @@ -604,9 +644,9 @@ "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "version": "0.3.29", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.29.tgz", + "integrity": "sha512-uw6guiW/gcAGPDhLmd77/6lW8QLeiV5RUTsAX46Db6oLhGaVj4lhnPwb184s1bkc8kdVg/+h988dro8GRDpmYQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2686,9 +2726,9 @@ } }, "node_modules/ignore": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.4.tgz", - "integrity": "sha512-gJzzk+PQNznz8ysRrC0aOkBNVRBDtE1n53IqyqEf3PXrYwomFs5q4pGMizBMJF+ykh03insJ27hB8gSrD2Hn8A==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", "dev": true, "license": "MIT", "engines": { @@ -3741,6 +3781,13 @@ "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==", "license": "MIT" }, + "node_modules/moo": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/moo/-/moo-0.5.2.tgz", + "integrity": "sha512-iSAJLHYKnX41mKcJKjqvnAN9sf0LMDTXDEvFv+ffuRR9a1MIuXLjMNL6EsnDHSkKLTWNqQQ5uo61P4EbU4NU+Q==", + "dev": true, + "license": "BSD-3-Clause" + }, "node_modules/mri": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", @@ -4941,6 +4988,27 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/unist-util-stringify-position": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", + "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-stringify-position/node_modules/@types/unist": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", + "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", + "dev": true, + "license": "MIT" + }, "node_modules/uuid": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", @@ -4970,6 +5038,50 @@ "node": ">=10.12.0" } }, + "node_modules/vfile": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz", + "integrity": "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-message": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-4.0.2.tgz", + "integrity": "sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-stringify-position": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-message/node_modules/@types/unist": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", + "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/vfile/node_modules/@types/unist": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", + "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", + "dev": true, + "license": "MIT" + }, "node_modules/vite": { "version": "6.3.5", "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.5.tgz", @@ -5383,6 +5495,29 @@ "node": ">= 14.6" } }, + "node_modules/yaml-unist-parser": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/yaml-unist-parser/-/yaml-unist-parser-2.0.5.tgz", + "integrity": "sha512-CirHjIkYcQxbG9wgYmzjJlMaBFuj788zLOgT0A2FAzdsw2dD4vnq4cx+kij/fXImG09ARnlODtS38JM1EottOw==", + "dev": true, + "license": "MIT", + "dependencies": { + "yaml": "^1.10.2" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/yaml-unist-parser/node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 6" + } + }, "node_modules/yargs": { "version": "18.0.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.0.0.tgz", diff --git a/package.json b/package.json index 1e9d0cfc5c..e5077b6e5f 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "scripts": { "build": "bash ./scripts/md2html/build.sh", "build-src": "npm run validate-markdown && bash ./scripts/md2html/build.sh src && bash ./scripts/schema-publish.sh src", - "test": "c8 --100 vitest --watch=false && bash scripts/schema-test-coverage.sh", + "test": "c8 --100 vitest run --coverage", "format-markdown": "npx markdownlint-cli2 --config spec.markdownlint.yaml --fix src/oas.md && npx markdownlint-cli2 --fix *.md", "validate-markdown": "npx markdownlint-cli2 --config spec.markdownlint.yaml src/oas.md && npx markdownlint-cli2 *.md" }, @@ -27,7 +27,7 @@ "yargs": "^18.0.0" }, "devDependencies": { - "@hyperjump/json-schema": "^1.16.1", + "@hyperjump/json-schema-coverage": "^1.1.0", "c8": "^10.1.3", "markdownlint-cli2": "^0.18.1", "vitest": "^3.2.4", diff --git a/scripts/schema-test-coverage.mjs b/scripts/schema-test-coverage.mjs deleted file mode 100644 index 5ebaad8d22..0000000000 --- a/scripts/schema-test-coverage.mjs +++ /dev/null @@ -1,161 +0,0 @@ -import { readFileSync } from "node:fs"; -import { readdir, readFile } from "node:fs/promises"; -import YAML from "yaml"; -import { join } from "node:path"; -import { argv } from "node:process"; -import { registerSchema, validate } from "@hyperjump/json-schema/openapi-3-1"; -import "@hyperjump/json-schema/draft-04"; -import { BASIC, defineVocabulary } from "@hyperjump/json-schema/experimental"; - -/** - * @import { EvaluationPlugin } from "@hyperjump/json-schema/experimental" - * @import { Json } from "@hyperjump/json-pointer" - */ - -import contentTypeParser from "content-type"; -import { addMediaTypePlugin } from "@hyperjump/browser"; -import { buildSchemaDocument } from "@hyperjump/json-schema/experimental"; - -addMediaTypePlugin("application/schema+yaml", { - parse: async (response) => { - const contentType = contentTypeParser.parse( - response.headers.get("content-type") ?? "", - ); - const contextDialectId = - contentType.parameters.schema ?? contentType.parameters.profile; - - const foo = YAML.parse(await response.text()); - return buildSchemaDocument(foo, response.url, contextDialectId); - }, - fileMatcher: (path) => path.endsWith(".yaml"), -}); - -/** @implements EvaluationPlugin */ -class TestCoveragePlugin { - constructor() { - /** @type Set */ - this.visitedLocations = new Set(); - } - - beforeSchema(_schemaUri, _instance, context) { - if (this.allLocations) { - return; - } - - /** @type Set */ - this.allLocations = []; - - for (const schemaLocation in context.ast) { - if ( - schemaLocation === "metaData" || - // Do not require coverage of standard JSON Schema - schemaLocation.includes("json-schema.org") || - // Do not require coverage of default $dynamicAnchor - // schemas, as they are not expected to be reached - schemaLocation.endsWith("/schema/WORK-IN-PROGRESS#/$defs/schema") - ) { - continue; - } - - if (Array.isArray(context.ast[schemaLocation])) { - for (const keyword of context.ast[schemaLocation]) { - if (Array.isArray(keyword)) { - this.allLocations.push(keyword[1]); - } - } - } - } - } - - beforeKeyword([, schemaUri]) { - this.visitedLocations.add(schemaUri); - } -} - -/** @type (testDirectory: string) => AsyncGenerator<[string,Json]> */ -const tests = async function* (testDirectory) { - for (const file of await readdir(testDirectory, { - recursive: true, - withFileTypes: true, - })) { - if (!file.isFile() || !file.name.endsWith(".yaml")) { - continue; - } - - const testPath = join(file.parentPath, file.name); - const testJson = await readFile(testPath, "utf8"); - - yield [testPath, YAML.parse(testJson)]; - } -}; - -/** - * @typedef {{ - * allLocations: string[]; - * visitedLocations: Set; - * }} Coverage - */ - -/** @type (schemaUri: string, testDirectory: string) => Promise */ -const runTests = async (schemaUri, testDirectory) => { - const testCoveragePlugin = new TestCoveragePlugin(); - const validateOpenApi = await validate(schemaUri); - - for await (const [name, test] of tests(testDirectory)) { - const result = validateOpenApi(test, { - outputFormat: BASIC, - plugins: [testCoveragePlugin], - }); - - if (!result.valid) { - console.log("Failed:", name, result.errors); - } - } - - return { - allLocations: testCoveragePlugin.allLocations ?? new Set(), - visitedLocations: testCoveragePlugin.visitedLocations - }; -}; - -const parseYamlFromFile = (filePath) => { - const schemaYaml = readFileSync(filePath, "utf8"); - return YAML.parse(schemaYaml, { prettyErrors: true }); -}; - -const meta = parseYamlFromFile("./src/schemas/validation/meta.yaml"); -const oasBaseVocab = Object.keys(meta.$vocabulary)[0]; - -defineVocabulary(oasBaseVocab, { - "discriminator": "https://spec.openapis.org/oas/3.0/keyword/discriminator", - "example": "https://spec.openapis.org/oas/3.0/keyword/example", - "externalDocs": "https://spec.openapis.org/oas/3.0/keyword/externalDocs", - "xml": "https://spec.openapis.org/oas/3.0/keyword/xml" -}); - -registerSchema(meta); -registerSchema(parseYamlFromFile("./src/schemas/validation/dialect.yaml")); -registerSchema(parseYamlFromFile("./src/schemas/validation/schema.yaml")); - -/////////////////////////////////////////////////////////////////////////////// - -const { allLocations, visitedLocations } = await runTests(argv[2], argv[3]); -const notCovered = allLocations.filter( - (location) => !visitedLocations.has(location), -); -if (notCovered.length > 0) { - console.log("NOT Covered:", notCovered.length, "of", allLocations.length); - const maxNotCovered = 20; - const firstNotCovered = notCovered.slice(0, maxNotCovered); - if (notCovered.length > maxNotCovered) firstNotCovered.push("..."); - console.log(firstNotCovered); - process.exitCode = 1; -} - -console.log( - "Covered:", - (allLocations.length - notCovered.length), - "of", - allLocations.length, - "(" + Math.floor(((allLocations.length - notCovered.length) / allLocations.length) * 100) + "%)", -); diff --git a/scripts/schema-test-coverage.sh b/scripts/schema-test-coverage.sh deleted file mode 100755 index 600199b907..0000000000 --- a/scripts/schema-test-coverage.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash - -# Author: @ralfhandl - -# Run this script from the root of the repo - -[[ ! -e src/schemas ]] && exit 0 - -echo -echo "Schema Test Coverage" -echo - -node scripts/schema-test-coverage.mjs src/schemas/validation/schema-base.yaml tests/schema/pass -rc=$? - -[[ "$BASE" == "dev" ]] || exit $rc diff --git a/tests/schema/oas-schema.mjs b/tests/schema/oas-schema.mjs new file mode 100644 index 0000000000..e0537549dc --- /dev/null +++ b/tests/schema/oas-schema.mjs @@ -0,0 +1,25 @@ +import { registerSchema } from "@hyperjump/json-schema/draft-2020-12"; +import { defineVocabulary } from "@hyperjump/json-schema/experimental"; +import { readFile } from "node:fs/promises"; +import YAML from "yaml"; + +const parseYamlFromFile = async (filePath) => { + const schemaYaml = await readFile(filePath, "utf8"); + return YAML.parse(schemaYaml, { prettyErrors: true }); +}; + +export default async () => { + const dialect = await parseYamlFromFile("./src/schemas/validation/dialect.yaml"); + const meta = await parseYamlFromFile("./src/schemas/validation/meta.yaml"); + const oasBaseVocab = Object.keys(meta.$vocabulary)[0]; + + defineVocabulary(oasBaseVocab, { + "discriminator": "https://spec.openapis.org/oas/3.0/keyword/discriminator", + "example": "https://spec.openapis.org/oas/3.0/keyword/example", + "externalDocs": "https://spec.openapis.org/oas/3.0/keyword/externalDocs", + "xml": "https://spec.openapis.org/oas/3.0/keyword/xml" + }); + + registerSchema(meta); + registerSchema(dialect); +}; diff --git a/tests/schema/schema.test.mjs b/tests/schema/schema.test.mjs index 4ba5924816..e7b84f0a74 100644 --- a/tests/schema/schema.test.mjs +++ b/tests/schema/schema.test.mjs @@ -1,46 +1,16 @@ import { readdirSync, readFileSync } from "node:fs"; import YAML from "yaml"; -import { registerSchema, validate, setMetaSchemaOutputFormat } from "@hyperjump/json-schema/openapi-3-1"; -import { BASIC, defineVocabulary } from "@hyperjump/json-schema/experimental"; import { describe, test, expect } from "vitest"; - -import contentTypeParser from "content-type"; -import { addMediaTypePlugin } from "@hyperjump/browser"; -import { buildSchemaDocument } from "@hyperjump/json-schema/experimental"; - -addMediaTypePlugin("application/schema+yaml", { - parse: async (response) => { - const contentType = contentTypeParser.parse(response.headers.get("content-type") ?? ""); - const contextDialectId = contentType.parameters.schema ?? contentType.parameters.profile; - - const foo = YAML.parse(await response.text()); - return buildSchemaDocument(foo, response.url, contextDialectId); - }, - fileMatcher: (path) => path.endsWith(".yaml") - }); +import { registerSchema } from "@hyperjump/json-schema-coverage/vitest"; +import registerOasSchema from "./oas-schema.mjs"; const parseYamlFromFile = (filePath) => { const schemaYaml = readFileSync(filePath, "utf8"); return YAML.parse(schemaYaml, { prettyErrors: true }); }; -setMetaSchemaOutputFormat(BASIC); - -const meta = parseYamlFromFile("./src/schemas/validation/meta.yaml"); -const oasBaseVocab = Object.keys(meta.$vocabulary)[0]; - -defineVocabulary(oasBaseVocab, { - "discriminator": "https://spec.openapis.org/oas/3.0/keyword/discriminator", - "example": "https://spec.openapis.org/oas/3.0/keyword/example", - "externalDocs": "https://spec.openapis.org/oas/3.0/keyword/externalDocs", - "xml": "https://spec.openapis.org/oas/3.0/keyword/xml" -}); - -registerSchema(meta); -registerSchema(parseYamlFromFile("./src/schemas/validation/dialect.yaml")); -registerSchema(parseYamlFromFile("./src/schemas/validation/schema.yaml")); - -const validateOpenApi = await validate("./src/schemas/validation/schema-base.yaml"); +await registerOasSchema(); +await registerSchema("./src/schemas/validation/schema.yaml"); const fixtures = './tests/schema'; describe("v3.1", () => { @@ -48,10 +18,9 @@ describe("v3.1", () => { readdirSync(`${fixtures}/pass`, { withFileTypes: true }) .filter((entry) => entry.isFile() && /\.yaml$/.test(entry.name)) .forEach((entry) => { - test(entry.name, () => { + test(entry.name, async () => { const instance = parseYamlFromFile(`${fixtures}/pass/${entry.name}`); - const output = validateOpenApi(instance, BASIC); - expect(output).to.deep.equal({ valid: true }); + await expect(instance).to.matchJsonSchema("./src/schemas/validation/schema-base.yaml"); }); }); }); @@ -60,10 +29,9 @@ describe("v3.1", () => { readdirSync(`${fixtures}/fail`, { withFileTypes: true }) .filter((entry) => entry.isFile() && /\.yaml$/.test(entry.name)) .forEach((entry) => { - test(entry.name, () => { + test(entry.name, async () => { const instance = parseYamlFromFile(`${fixtures}/fail/${entry.name}`); - const output = validateOpenApi(instance, BASIC); - expect(output.valid).to.equal(false); + await expect(instance).to.not.matchJsonSchema("./src/schemas/validation/schema-base.yaml"); }); }); }); diff --git a/vitest.config.mjs b/vitest.config.mjs index 4268028a0d..f5c7665b70 100644 --- a/vitest.config.mjs +++ b/vitest.config.mjs @@ -1,8 +1,17 @@ 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" ? { + 100: true + } : {} + }, forceRerunTriggers: ['**/scripts/**', '**/tests/**'], testTimeout: 10000, // 10 seconds }, -}) \ No newline at end of file +})