mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-23 00:06:17 -04:00
Merge branch 'no-var-rule' of https://github.com/graingert/CyberChef into graingert-no-var-rule
This commit is contained in:
commit
d3377d56b4
65 changed files with 779 additions and 756 deletions
|
@ -38,7 +38,7 @@ import Chef from "../src/core/Chef.js";
|
|||
TestRegister.prototype.runTests = function() {
|
||||
return Promise.all(
|
||||
this.tests.map(function(test, i) {
|
||||
var chef = new Chef();
|
||||
let chef = new Chef();
|
||||
|
||||
return Promise.resolve(chef.bake(
|
||||
test.input,
|
||||
|
@ -48,7 +48,7 @@ import Chef from "../src/core/Chef.js";
|
|||
false
|
||||
))
|
||||
.then(function(result) {
|
||||
var ret = {
|
||||
let ret = {
|
||||
test: test,
|
||||
status: null,
|
||||
output: null,
|
||||
|
|
|
@ -19,7 +19,7 @@ import "./tests/operations/FlowControl.js";
|
|||
import "./tests/operations/MorseCode.js";
|
||||
import "./tests/operations/StrUtils.js";
|
||||
|
||||
var allTestsPassing = true,
|
||||
let allTestsPassing = true,
|
||||
testStatusCounts = {
|
||||
total: 0,
|
||||
};
|
||||
|
@ -32,7 +32,7 @@ var allTestsPassing = true,
|
|||
* @returns {string}
|
||||
*/
|
||||
function statusToIcon(status) {
|
||||
var icons = {
|
||||
let icons = {
|
||||
erroring: "🔥",
|
||||
failing: "❌",
|
||||
passing: "✔️️",
|
||||
|
@ -48,7 +48,7 @@ function statusToIcon(status) {
|
|||
*/
|
||||
function handleTestResult(testResult) {
|
||||
allTestsPassing = allTestsPassing && testResult.status === "passing";
|
||||
var newCount = (testStatusCounts[testResult.status] || 0) + 1;
|
||||
let newCount = (testStatusCounts[testResult.status] || 0) + 1;
|
||||
testStatusCounts[testResult.status] = newCount;
|
||||
testStatusCounts.total += 1;
|
||||
|
||||
|
@ -83,8 +83,8 @@ TestRegister.runTests()
|
|||
|
||||
console.log("\n");
|
||||
|
||||
for (var testStatus in testStatusCounts) {
|
||||
var count = testStatusCounts[testStatus];
|
||||
for (let testStatus in testStatusCounts) {
|
||||
let count = testStatusCounts[testStatus];
|
||||
if (count > 0) {
|
||||
console.log(testStatus.toUpperCase(), count);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue