aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/test-profile-conditions.js9
1 files changed, 2 insertions, 7 deletions
diff --git a/test/test-profile-conditions.js b/test/test-profile-conditions.js
index ce26cbb4..d7402acf 100644
--- a/test/test-profile-conditions.js
+++ b/test/test-profile-conditions.js
@@ -26,16 +26,11 @@ vm.execute([
'bg/js/json-schema.js',
'bg/js/profile-conditions2.js'
]);
-const [JsonSchema, ProfileConditions] = vm.get(['JsonSchema', 'ProfileConditions']);
+const [JsonSchemaValidator, ProfileConditions] = vm.get(['JsonSchemaValidator', 'ProfileConditions']);
function schemaValidate(value, schema) {
- try {
- JsonSchema.validate(value, schema);
- return true;
- } catch (e) {
- return false;
- }
+ return new JsonSchemaValidator().isValid(value, schema);
}