aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/test-json-schema.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/test-json-schema.js b/test/test-json-schema.js
index d8e351be..d082a53f 100644
--- a/test/test-json-schema.js
+++ b/test/test-json-schema.js
@@ -40,6 +40,10 @@ function createProxy(schema, value) {
return new JsonSchemaValidator().createProxy(value, schema);
}
+function clone(value) {
+ return JSON.parse(JSON.stringify(value));
+}
+
function testValidate1() {
const schema = {
@@ -799,8 +803,8 @@ function testProxy1() {
for (const {schema, tests} of data) {
for (let {error, value, action} of tests) {
if (typeof value === 'undefined') { value = getValidValueOrDefault(schema, void 0); }
+ value = clone(value);
assert.ok(schemaValidate(schema, value));
- console.log(error, value, schema);
const valueProxy = createProxy(schema, value);
if (error) {
assert.throws(() => action(valueProxy));