Update checked-in dependencies

This commit is contained in:
github-actions[bot] 2023-10-23 18:03:04 +00:00
parent 79817eb679
commit 9c3b394d7f
402 changed files with 12598 additions and 2912 deletions

View file

@ -110,6 +110,54 @@ describe("ObjectSchema", () => {
});
it("should throw an error when merge() throws an error with a readonly message", () => {
let schema = new ObjectSchema({
foo: {
merge() {
throw {
get message() {
return "Boom!";
}
};
},
validate() {}
}
});
assert.throws(() => {
schema.merge({ foo: true }, { foo: true });
}, /Key "foo": Boom!/);
});
it("should throw an error with custom properties when merge() throws an error with custom properties", () => {
let schema = new ObjectSchema({
foo: {
merge() {
throw {
get message() {
return "Boom!";
},
booya: true
};
},
validate() {}
}
});
let errorThrown = false;
try {
schema.merge({ foo: true }, { foo: true });
} catch (ex) {
errorThrown = true;
assert.isTrue(ex.booya);
}
assert.isTrue(errorThrown);
});
it("should call the merge() strategy for one key when called", () => {
schema = new ObjectSchema({