1
0
mirror of synced 2025-01-31 12:03:42 +01:00

Fixed tests and brought test module naming in line with conventions.

This commit is contained in:
n1474335 2017-03-25 13:32:35 +00:00
parent 9bd11dc7ad
commit c75ebcf001
4 changed files with 6 additions and 15 deletions

View File

@ -210,32 +210,20 @@ module.exports = function (grunt) {
}, },
tests: { tests: {
target: "node", target: "node",
entry: ["babel-polyfill", "./test/TestRunner.js"], entry: "./test/index.js",
output: { output: {
filename: "index.js", filename: "index.js",
path: "build/test" path: "build/test"
},
module: {
loaders: [{
test: /prettify\.min\.js$/,
use: "imports-loader?window=>global"
}]
} }
}, },
node: { node: {
target: "node", target: "node",
entry: ["babel-polyfill", "./src/node/index.js"], entry: "./src/node/index.js",
output: { output: {
filename: "CyberChef.js", filename: "CyberChef.js",
path: "build/node", path: "build/node",
library: "CyberChef", library: "CyberChef",
libraryTarget: "commonjs2" libraryTarget: "commonjs2"
},
module: {
loaders: [{
test: /prettify\.min\.js$/,
use: "imports-loader?window=>global"
}]
} }
} }
}, },

View File

@ -2,7 +2,7 @@ import Utils from "../Utils.js";
import vkbeautify from "vkbeautify"; import vkbeautify from "vkbeautify";
import {DOMParser as dom} from "xmldom"; import {DOMParser as dom} from "xmldom";
import xpath from "xpath"; import xpath from "xpath";
import prettyPrintOne from "exports-loader?prettyPrintOne!google-code-prettify/bin/prettify.min.js"; import prettyPrintOne from "imports-loader?window=>global!exports-loader?prettyPrintOne!google-code-prettify/bin/prettify.min.js";
/** /**

View File

@ -5,6 +5,7 @@
* @copyright Crown Copyright 2017 * @copyright Crown Copyright 2017
* @license Apache-2.0 * @license Apache-2.0
*/ */
import "babel-polyfill";
var Chef = require("../core/Chef.js").default; var Chef = require("../core/Chef.js").default;

View File

@ -8,6 +8,8 @@
* @copyright Crown Copyright 2017 * @copyright Crown Copyright 2017
* @license Apache-2.0 * @license Apache-2.0
*/ */
import "babel-polyfill";
import TestRegister from "./TestRegister.js"; import TestRegister from "./TestRegister.js";
import "./tests/operations/Base58.js"; import "./tests/operations/Base58.js";
import "./tests/operations/Compress.js"; import "./tests/operations/Compress.js";