Skip to content

Commit f9cd70a

Browse files
committed
Use only pass cases for coverage
1 parent 1cdc217 commit f9cd70a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

scripts/schema-test-coverage.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { join } from "node:path";
44
import { argv } from "node:process";
55
import "@hyperjump/json-schema/draft-2020-12";
66
import "@hyperjump/json-schema/draft-04";
7-
import { compile, getSchema, interpret, Validation } from "@hyperjump/json-schema/experimental";
7+
import { compile, getSchema, interpret, Validation, BASIC } from "@hyperjump/json-schema/experimental";
88
import * as Instance from "@hyperjump/json-schema/instance/experimental";
99

1010
/**
@@ -45,7 +45,9 @@ const runTests = async (testDirectory) => {
4545
for await (const test of tests(testDirectory)) {
4646
const instance = Instance.fromJs(test);
4747

48-
interpret(compiled, instance);
48+
const result = interpret(compiled, instance, BASIC);
49+
//TODO: now result has errors array if valid is false
50+
// if (!result.valid) console.log(result)
4951
}
5052
};
5153

scripts/schema-test-coverage.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ for schemaDir in schemas/v3* ; do
1212
version=$(basename "$schemaDir")
1313
echo $version
1414

15-
node scripts/schema-test-coverage.mjs $schemaDir/schema.yaml tests/$version
15+
node scripts/schema-test-coverage.mjs $schemaDir/schema.yaml tests/$version/pass
1616

1717
echo
1818
done

0 commit comments

Comments
 (0)