소스 검색

Fixed 'Diff' imports and added test

n1474335 8 년 전
부모
커밋
ed21dff88f
8개의 변경된 파일16개의 추가작업 그리고 5개의 파일을 삭제
  1. 1 1
      .babelrc
  2. 1 1
      Gruntfile.js
  3. 0 0
      build/prod/cyberchef.htm
  4. 0 0
      build/prod/index.html
  5. 0 0
      build/prod/scripts.js
  6. 1 1
      src/core/operations/StrUtils.js
  7. 2 2
      src/web/static/stats.txt
  8. 11 0
      test/tests/operations/StrUtils.js

+ 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"],

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
build/prod/cyberchef.htm


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
build/prod/index.html


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 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]
+            }
+        ],
+    },
 ]);

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.