Files
simple-mail-cleaner/backend/node_modules/fast-json-stringify/test/fix-604.test.js
2026-01-22 15:49:12 +01:00

25 lines
388 B
JavaScript

'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.')
}