aboutsummaryrefslogtreecommitdiff
path: root/test/test-json-schema.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-05-22 15:45:20 -0400
committerGitHub <noreply@github.com>2021-05-22 15:45:20 -0400
commitd16739a83a20e1729e08dbcbbc155be15972d146 (patch)
treef7c12fa946a688750365ecf0f66227fcad4f927d /test/test-json-schema.js
parentb48052ff320f1a68aac317158c4c757a70b14f04 (diff)
Json schema validation improvements (#1697)
* Create new JsonSchema class * Add proxy handler * Update tests * Update validation scripts * Update backend * Update audio downloader * Update options util * Update dictionary importer * Update json schema file reference * Remove old json-schema.js * Rename new json-schema.js * Update file names * Rename class
Diffstat (limited to 'test/test-json-schema.js')
-rw-r--r--test/test-json-schema.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/test-json-schema.js b/test/test-json-schema.js
index d082a53f..ba0131bf 100644
--- a/test/test-json-schema.js
+++ b/test/test-json-schema.js
@@ -25,19 +25,19 @@ vm.execute([
'js/general/cache-map.js',
'js/data/json-schema.js'
]);
-const JsonSchemaValidator = vm.get('JsonSchemaValidator');
+const JsonSchema = vm.get('JsonSchema');
function schemaValidate(schema, value) {
- return new JsonSchemaValidator().isValid(value, schema);
+ return new JsonSchema(schema).isValid(value);
}
function getValidValueOrDefault(schema, value) {
- return new JsonSchemaValidator().getValidValueOrDefault(schema, value);
+ return new JsonSchema(schema).getValidValueOrDefault(value);
}
function createProxy(schema, value) {
- return new JsonSchemaValidator().createProxy(value, schema);
+ return new JsonSchema(schema).createProxy(value);
}
function clone(value) {