We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab900c8 commit feebc28Copy full SHA for feebc28
test/date.test.js
@@ -525,3 +525,22 @@ test('nullable date', (t) => {
525
526
t.same(result, `"${DateTime.fromJSDate(data).toISODate()}"`)
527
})
528
+
529
+test('non-date format should not affect data serialization (issue #491)', (t) => {
530
+ t.plan(1)
531
532
+ const schema = {
533
+ type: 'object',
534
+ properties: {
535
+ hello: {
536
+ type: 'string',
537
+ format: 'int64',
538
+ pattern: '^[0-9]*$'
539
+ }
540
541
542
543
+ const stringify = build(schema)
544
+ const data = { hello: 123n }
545
+ t.equal(stringify(data), '{"hello":"123"}')
546
+})
0 commit comments