소스 검색

add assertions for chef.bake leniancy on op names

d98762625 6 년 전
부모
커밋
b36e3adf7c
1개의 변경된 파일10개의 추가작업 그리고 0개의 파일을 삭제
  1. 10 0
      test/tests/nodeApi/nodeApi.mjs

+ 10 - 0
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");