Spaces:
Runtime error
Runtime error
File size: 345 Bytes
23ac194 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
'use strict'
const { test } = require('node:test')
const build = require('..')
// Covers issue #139
test('Should throw on invalid schema', t => {
t.plan(1)
t.assert.throws(() => {
build({}, {
schema: {
invalid: {
type: 'Dinosaur'
}
}
})
}, { message: /^"invalid" schema is invalid:.*/ })
})
|