基本schema测试

This commit is contained in:
2025-09-22 16:00:32 +08:00
commit b70b69c886
2754 changed files with 408678 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
'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"' })
})