From b36e3adf7c9a0ba7c23d39cc43d924ffb61d8886 Mon Sep 17 00:00:00 2001 From: d98762625 Date: Fri, 31 Aug 2018 15:03:53 +0100 Subject: [PATCH] add assertions for chef.bake leniancy on op names --- test/tests/nodeApi/nodeApi.mjs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/tests/nodeApi/nodeApi.mjs b/test/tests/nodeApi/nodeApi.mjs index c7bfa046..24145846 100644 --- a/test/tests/nodeApi/nodeApi.mjs +++ b/test/tests/nodeApi/nodeApi.mjs @@ -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"); }), + 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", () => { const result = chef.bake("some input", []); assert.strictEqual(result.toString(), "some input");