mirror of
https://github.com/gchq/CyberChef
synced 2025-01-13 21:18:47 +00:00
move eslintrc up a directory
This commit is contained in:
parent
f7547db272
commit
ee07b72415
4 changed files with 12 additions and 12 deletions
10
Gruntfile.js
10
Gruntfile.js
|
@ -92,13 +92,13 @@ module.exports = function (grunt) {
|
||||||
}, function(error, result) {
|
}, function(error, result) {
|
||||||
if (error) {
|
if (error) {
|
||||||
if (error instanceof Error) {
|
if (error instanceof Error) {
|
||||||
done(error)
|
done(error);
|
||||||
} else {
|
} else {
|
||||||
done(new Error(error));
|
done(new Error(error));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
grunt.file.write("build/prod/cyberchef.htm", result);
|
grunt.file.write("build/prod/cyberchef.htm", result);
|
||||||
done(true);
|
done(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -113,7 +113,7 @@ module.exports = function (grunt) {
|
||||||
},
|
},
|
||||||
eslint: {
|
eslint: {
|
||||||
options: {
|
options: {
|
||||||
configFile: "src/.eslintrc.json"
|
configFile: "./.eslintrc.json"
|
||||||
},
|
},
|
||||||
configs: ["Gruntfile.js"],
|
configs: ["Gruntfile.js"],
|
||||||
core: ["src/core/**/*.js", "!src/core/lib/**/*"],
|
core: ["src/core/**/*.js", "!src/core/lib/**/*"],
|
||||||
|
|
|
@ -38,7 +38,7 @@ import Chef from "../src/core/Chef.js";
|
||||||
TestRegister.prototype.runTests = function() {
|
TestRegister.prototype.runTests = function() {
|
||||||
return Promise.all(
|
return Promise.all(
|
||||||
this.tests.map(function(test, i) {
|
this.tests.map(function(test, i) {
|
||||||
var chef = new Chef();
|
let chef = new Chef();
|
||||||
|
|
||||||
return Promise.resolve(chef.bake(
|
return Promise.resolve(chef.bake(
|
||||||
test.input,
|
test.input,
|
||||||
|
@ -48,7 +48,7 @@ import Chef from "../src/core/Chef.js";
|
||||||
false
|
false
|
||||||
))
|
))
|
||||||
.then(function(result) {
|
.then(function(result) {
|
||||||
var ret = {
|
let ret = {
|
||||||
test: test,
|
test: test,
|
||||||
status: null,
|
status: null,
|
||||||
output: null,
|
output: null,
|
||||||
|
|
|
@ -18,7 +18,7 @@ import "./tests/operations/FlowControl.js";
|
||||||
import "./tests/operations/MorseCode.js";
|
import "./tests/operations/MorseCode.js";
|
||||||
import "./tests/operations/StrUtils.js";
|
import "./tests/operations/StrUtils.js";
|
||||||
|
|
||||||
var allTestsPassing = true,
|
let allTestsPassing = true,
|
||||||
testStatusCounts = {
|
testStatusCounts = {
|
||||||
total: 0,
|
total: 0,
|
||||||
};
|
};
|
||||||
|
@ -31,7 +31,7 @@ var allTestsPassing = true,
|
||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
function statusToIcon(status) {
|
function statusToIcon(status) {
|
||||||
var icons = {
|
let icons = {
|
||||||
erroring: "🔥",
|
erroring: "🔥",
|
||||||
failing: "❌",
|
failing: "❌",
|
||||||
passing: "✔️️",
|
passing: "✔️️",
|
||||||
|
@ -47,7 +47,7 @@ function statusToIcon(status) {
|
||||||
*/
|
*/
|
||||||
function handleTestResult(testResult) {
|
function handleTestResult(testResult) {
|
||||||
allTestsPassing = allTestsPassing && testResult.status === "passing";
|
allTestsPassing = allTestsPassing && testResult.status === "passing";
|
||||||
var newCount = (testStatusCounts[testResult.status] || 0) + 1;
|
let newCount = (testStatusCounts[testResult.status] || 0) + 1;
|
||||||
testStatusCounts[testResult.status] = newCount;
|
testStatusCounts[testResult.status] = newCount;
|
||||||
testStatusCounts.total += 1;
|
testStatusCounts.total += 1;
|
||||||
|
|
||||||
|
@ -82,8 +82,8 @@ TestRegister.runTests()
|
||||||
|
|
||||||
console.log("\n");
|
console.log("\n");
|
||||||
|
|
||||||
for (var testStatus in testStatusCounts) {
|
for (let testStatus in testStatusCounts) {
|
||||||
var count = testStatusCounts[testStatus];
|
let count = testStatusCounts[testStatus];
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
console.log(testStatus.toUpperCase(), count);
|
console.log(testStatus.toUpperCase(), count);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue