Skip to content

Commit 0fadf2e

Browse files
committed
Do not expect coverage of unreachable schema
There needs to be a local `$dynamicAnchor`, but it is never actually evaluated.
1 parent 3a0fb3d commit 0fadf2e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

scripts/schema-test-coverage.mjs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,12 @@ class TestCoveragePlugin {
4848
for (const schemaLocation in context.ast) {
4949
if (
5050
schemaLocation === "metaData" ||
51-
schemaLocation.includes("json-schema.org")
51+
// Do not reqiure coverage of standard JSON Schema
52+
schemaLocation.includes("json-schema.org") ||
53+
// Do not require coverage of default $dynamicAnchor
54+
// schemas, as they are not expected to be reached
55+
// schemaLocation.includes("/schema/WORK-IN-PROGRESS#/$defs/schema/")
56+
schemaLocation.endsWith("/schema/WORK-IN-PROGRESS#/$defs/schema")
5257
) {
5358
continue;
5459
}

0 commit comments

Comments
 (0)