Auto-commit 2026-04-29 16:31
This commit is contained in:
24
node_modules/fast-json-stringify/test/fix-604.test.js
generated
vendored
Normal file
24
node_modules/fast-json-stringify/test/fix-604.test.js
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
'use strict'
|
||||
|
||||
const t = require('tap')
|
||||
const fjs = require('..')
|
||||
const schema = {
|
||||
type: 'object',
|
||||
properties: {
|
||||
fullName: { type: 'string' },
|
||||
phone: { type: 'number' }
|
||||
}
|
||||
}
|
||||
|
||||
const input = {
|
||||
fullName: 'Jone',
|
||||
phone: 'phone'
|
||||
}
|
||||
|
||||
const render = fjs(schema)
|
||||
|
||||
try {
|
||||
render(input)
|
||||
} catch (err) {
|
||||
t.equal(err.message, 'The value "phone" cannot be converted to a number.')
|
||||
}
|
||||
Reference in New Issue
Block a user