From 749a587eb2323ea0c1028a5c68a02d3f2d31a755 Mon Sep 17 00:00:00 2001 From: d98762625 Date: Tue, 4 Sep 2018 09:55:41 +0100 Subject: [PATCH] fix tests after merge; remove detectFileType as it behaves erratically --- .gitignore | 4 ++-- src/node/config/excludedOperations.mjs | 2 ++ test/tests/nodeApi/nodeApi.mjs | 2 +- test/tests/nodeApi/ops.mjs | 8 -------- 4 files changed, 5 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 7b0f9082..6e39dad8 100755 --- a/.gitignore +++ b/.gitignore @@ -10,5 +10,5 @@ src/core/config/modules/* src/core/config/OperationConfig.json src/core/operations/index.mjs src/node/config/OperationConfig.json - -**/*.DS_Store \ No newline at end of file +src/node/index.mjs +**/*.DS_Storeg \ No newline at end of file diff --git a/src/node/config/excludedOperations.mjs b/src/node/config/excludedOperations.mjs index 6344215d..ee097bbb 100644 --- a/src/node/config/excludedOperations.mjs +++ b/src/node/config/excludedOperations.mjs @@ -29,4 +29,6 @@ export default [ "RenderImage", "SyntaxHighlighter", + + "DetectFileType", ]; diff --git a/test/tests/nodeApi/nodeApi.mjs b/test/tests/nodeApi/nodeApi.mjs index 59747ea5..3ca83f72 100644 --- a/test/tests/nodeApi/nodeApi.mjs +++ b/test/tests/nodeApi/nodeApi.mjs @@ -136,7 +136,7 @@ TestRegister.addApiTests([ it("chef.help: returns multiple results", () => { const result = chef.help("base 64"); - assert.strictEqual(result.length, 8); + assert.strictEqual(result.length, 10); }), it("chef.help: looks in description for matches too", () => { diff --git a/test/tests/nodeApi/ops.mjs b/test/tests/nodeApi/ops.mjs index 70a6ceac..9148d656 100644 --- a/test/tests/nodeApi/ops.mjs +++ b/test/tests/nodeApi/ops.mjs @@ -956,14 +956,6 @@ smothering ampersand abreast assert.strictEqual(chef.zlibInflate(chef.zlibDeflate("cut homer wile rooky grits dizen")).toString(), "cut homer wile rooky grits dizen"); }), - - it("Detect file type", () => { - assert.strictEqual( - chef.detectFileType(fs.readFileSync("src/web/static/images/cook_male-32x32.png")).toString(), - `File extension: png -MIME type: image/png`); - }), - it("extract EXIF", () => { assert.strictEqual( chef.extractEXIF(fs.readFileSync("test/tests/nodeApi/sampleData/pic.jpg")).toString(),