Преглед изворни кода

fix tests after merge; remove detectFileType as it behaves erratically

d98762625 пре 7 година
родитељ
комит
749a587eb2
4 измењених фајлова са 5 додато и 11 уклоњено
  1. 2 2
      .gitignore
  2. 2 0
      src/node/config/excludedOperations.mjs
  3. 1 1
      test/tests/nodeApi/nodeApi.mjs
  4. 0 8
      test/tests/nodeApi/ops.mjs

+ 2 - 2
.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
+src/node/index.mjs
+**/*.DS_Storeg

+ 2 - 0
src/node/config/excludedOperations.mjs

@@ -29,4 +29,6 @@ export default  [
 
     "RenderImage",
     "SyntaxHighlighter",
+
+    "DetectFileType",
 ];

+ 1 - 1
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", () => {

+ 0 - 8
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(),