Aktueller Stand

This commit is contained in:
2026-01-22 19:05:45 +01:00
parent 85dee61a4d
commit e280e4eadb
1967 changed files with 397327 additions and 74093 deletions

View File

@@ -2,25 +2,22 @@
const build = require('../..')
function runTests (t, testsuite, skippedTests) {
async function runTests (t, testsuite, skippedTests) {
for (const scenario of testsuite) {
const stringify = build(scenario.schema)
for (const test of scenario.tests) {
if (skippedTests.indexOf(test.description) !== -1) {
t.comment('skip %s', test.description)
console.log(`skip ${test.description}`)
continue
}
t.test(test.description, (t) => {
await t.test(test.description, (t) => {
t.plan(1)
try {
const output = stringify(test.data)
t.equal(output, JSON.stringify(test.data), 'compare payloads')
t.assert.equal(output, JSON.stringify(test.data), 'compare payloads')
} catch (err) {
if (test.valid === false) {
t.pass('payload is invalid')
} else {
t.fail('payload should be valid: ' + err.message)
}
t.assert.ok(test.valid === false, 'payload should be valid: ' + err.message)
}
})
}