Spaces:
Runtime error
Runtime error
File size: 359 Bytes
23ac194 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
'use strict'
const { test } = require('node:test')
const build = require('..')
test('sanitize 5', t => {
const payload = '(throw "pwoned")'
t.assert.throws(() => {
build({
patternProperties: {
'*': { type: `*/${payload}){//` }
}
})
}, { message: 'schema is invalid: data/patternProperties must match format "regex"' })
})
|