-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated test script
- Loading branch information
Showing
4 changed files
with
26 additions
and
47 deletions.
There are no files selected for viewing
Submodule curriculum-basis
updated
15 files
+2 −2 | .circleci/config.yml | |
+0 −19 | context.json | |
+1 −1 | curriculum-examenprogramma | |
+1 −1 | curriculum-kerndoelen | |
+61,614 −0 | data/deprecated.json | |
+494 −115 | data/doelen.json | |
+136,619 −127,854 | data/doelniveaus.json | |
+51 −5 | data/niveaus.json | |
+64 −71 | data/vakleergebieden.json | |
+752 −30 | package-lock.json | |
+4 −5 | package.json | |
+18 −0 | scripts/repl.mjs | |
+24 −0 | src/index.mjs | |
+0 −38 | test/test.js | |
+21 −0 | test/test.mjs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import Curriculum from 'curriculum-js' | ||
|
||
async function validate() { | ||
|
||
var curriculum = new Curriculum() | ||
var basisSchema = await curriculum.loadContextFromFile('curriculum-basis', 'curriculum-basis/context.json'); | ||
var schema = await curriculum.loadContextFromFile('curriculum-leerdoelenkaarten', 'context.json'); | ||
try { | ||
let result = await curriculum.validate(schema) | ||
console.log('Data is valid!') | ||
} catch(error) { | ||
if (!error.validationErrors) { | ||
console.error(error) | ||
} else { | ||
error.validationErrors.forEach(error => { | ||
console.error(error.instancePath+': '+error.message) | ||
}) | ||
} | ||
} | ||
} | ||
|
||
validate() |