Bläddra i källkod

Fixed 'Diff' imports and added test

n1474335 8 år sedan
förälder
incheckning
ed21dff88f

+ 1 - 1
.babelrc

@@ -9,4 +9,4 @@
             "modules": false
         }]
     ]
-}
+}

+ 1 - 1
Gruntfile.js

@@ -121,7 +121,7 @@ module.exports = function (grunt) {
             options: {
                 configFile: "src/.eslintrc.json"
             },
-            gruntfile: ["Gruntfile.js"],
+            configs: ["Gruntfile.js"],
             core: ["src/core/**/*.js", "!src/core/lib/**/*"],
             web: ["src/web/**/*.js"],
             node: ["src/node/**/*.js"],

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
build/prod/cyberchef.htm


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
build/prod/index.html


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
build/prod/scripts.js


+ 1 - 1
src/core/operations/StrUtils.js

@@ -1,5 +1,5 @@
 import Utils from "../Utils.js";
-import JsDiff from "diff";
+import * as JsDiff from "diff";
 
 
 /**

+ 2 - 2
src/web/static/stats.txt

@@ -1,4 +1,4 @@
-128	source files
+129	source files
 49196	lines
 1.9M	size
 
@@ -6,7 +6,7 @@
 21013	lines
 788K	size
 
-	uncompressed JavaScript size
+4.7M	uncompressed JavaScript size
 	compressed JavaScript size
 
 15	categories

+ 11 - 0
test/tests/operations/StrUtils.js

@@ -23,4 +23,15 @@ TestRegister.addTests([
             }
         ],
     },
+    {
+        name: "Diff, basic usage",
+        input: "testing23\n\ntesting123",
+        expectedOutput: "testing<span class='hlgreen'>1</span>23",
+        recipeConfig: [
+            {
+                "op": "Diff",
+                "args": ["\\n\\n", "Character", true, true, false]
+            }
+        ],
+    },
 ]);

Vissa filer visades inte eftersom för många filer har ändrats