fix: revert previous commit wrong file staged, added file with new test for error feature
This commit is contained in:
parent
8589e06e78
commit
b824268525
@ -46,7 +46,7 @@ class XOR extends Operation {
|
|||||||
{
|
{
|
||||||
"name": "Filter Key",
|
"name": "Filter Key",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"value": false
|
"value": true
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -974,6 +974,19 @@ smothering ampersand abreast`;
|
|||||||
"QV\u0010\u0004UDWQ");
|
"QV\u0010\u0004UDWQ");
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
it("XOR: should throw 'Invalid Characters in key' error when key contains invalid characters", () => {
|
||||||
|
const invalidKeys = [
|
||||||
|
{ string: "zz 00 11", option: "Hex" },
|
||||||
|
|
||||||
|
{ string: "4~ 00 11", option: "Hex" }
|
||||||
|
];
|
||||||
|
invalidKeys.forEach(invalidKey => {
|
||||||
|
assert.throws(() => {
|
||||||
|
chef.XOR("fe023da5", { key: invalidKey });
|
||||||
|
}, /Invalid Characters in key/);
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
|
||||||
it("XPath expression", () => {
|
it("XPath expression", () => {
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
chef.XPathExpression("<contact-info><company>abc</company></contact-info>", {xPath: "contact-info/company"}).toString(),
|
chef.XPathExpression("<contact-info><company>abc</company></contact-info>", {xPath: "contact-info/company"}).toString(),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user