mirror of
https://github.com/gchq/CyberChef.git
synced 2024-10-01 07:51:32 +02:00
add assertions for chef.bake leniancy on op names
This commit is contained in:
parent
c6a292bccb
commit
b36e3adf7c
@ -187,6 +187,16 @@ TestRegister.addApiTests([
|
|||||||
assert.strictEqual(result.toString(), "Protocol:\thttps:\nHostname:\tgoogle.com\nPath name:\t/search\nArguments:\n\tq = that's a complicated question\n");
|
assert.strictEqual(result.toString(), "Protocol:\thttps:\nHostname:\tgoogle.com\nPath name:\t/search\nArguments:\n\tq = that's a complicated question\n");
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
it("chef.bake: forgiving with operation names", () =>{
|
||||||
|
const result = chef.bake("https://google.com/search?q=that's a complicated question", ["urlencode", "url decode", "parseURI"]);
|
||||||
|
assert.strictEqual(result.toString(), "Protocol:\thttps:\nHostname:\tgoogle.com\nPath name:\t/search\nArguments:\n\tq = that's a complicated question\n");
|
||||||
|
}),
|
||||||
|
|
||||||
|
it("chef.bake: forgiving with operation names", () =>{
|
||||||
|
const result = chef.bake("hello", ["to base 64"]);
|
||||||
|
assert.strictEqual(result.toString(), "aGVsbG8=");
|
||||||
|
}),
|
||||||
|
|
||||||
it("chef.bake: if recipe is empty array, return input as dish", () => {
|
it("chef.bake: if recipe is empty array, return input as dish", () => {
|
||||||
const result = chef.bake("some input", []);
|
const result = chef.bake("some input", []);
|
||||||
assert.strictEqual(result.toString(), "some input");
|
assert.strictEqual(result.toString(), "some input");
|
||||||
|
Loading…
Reference in New Issue
Block a user