UNPKG
pi-test-data
Version:
latest (1.0.8)
1.0.8
Manage test data for automation
github.com/automationpi/datapi
automationpi/datapi
pi-test-data
/
tester
/
node_modules
/
fast-json-stringify
/
test
/
sanitize3.test.js
18 lines
(14 loc)
•
264 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
'use strict'
const
t =
require
(
'tap'
)
const
build =
require
(
'..'
)
const
stringify =
build
({
$defs
: {
type
:
'foooo"bar'
},
patternProperties
: {
x
: {
$ref
:
'#/$defs'
} } }) t.
throws
(
() =>
{
stringify
({
x
:
0
}) },
'Cannot coerce 0 to "foo"bar"'
)