From 70be54e262a91ac8d520996e1f32763c0de64c62 Mon Sep 17 00:00:00 2001 From: Jonas Date: Wed, 30 Apr 2025 22:33:33 -0400 Subject: [PATCH] added test to check that the error isn't raised on valid keys with filter set to false --- tests/node/tests/operations.mjs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/node/tests/operations.mjs b/tests/node/tests/operations.mjs index 7e1b8913..e46d426f 100644 --- a/tests/node/tests/operations.mjs +++ b/tests/node/tests/operations.mjs @@ -987,6 +987,14 @@ smothering ampersand abreast`; }); }), + it("XOR: should not throw 'Invalid Characters in key' error when key contains only valid characters", () => { + assert.strictEqual(chef.XOR("fe023da5", { + key: "73 6f 6d 65", + filterKey: false + }).toString(), + "\u0015\n]W@\u000b\fP"); + }), + it("XPath expression", () => { assert.strictEqual( chef.XPathExpression("abc", {xPath: "contact-info/company"}).toString(),