mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 23:06:16 -04:00
OperationErrors now bubble up to the top of the API.
Added test functionality for node api refactor TestRegister into class
This commit is contained in:
parent
e50758f0a6
commit
5fb50a1759
6 changed files with 194 additions and 30 deletions
|
@ -55,6 +55,9 @@ import "./tests/operations/SymmetricDifference";
|
|||
import "./tests/operations/CartesianProduct";
|
||||
import "./tests/operations/PowerSet";
|
||||
|
||||
|
||||
import "./tests/nodeApi/nodeApi";
|
||||
|
||||
let allTestsPassing = true;
|
||||
const testStatusCounts = {
|
||||
total: 0,
|
||||
|
@ -112,9 +115,12 @@ setTimeout(function() {
|
|||
process.exit(1);
|
||||
}, 10 * 1000);
|
||||
|
||||
|
||||
TestRegister.runTests()
|
||||
.then(function(results) {
|
||||
Promise.all([
|
||||
TestRegister.runTests(),
|
||||
TestRegister.runApiTests()
|
||||
])
|
||||
.then(function(resultsPair) {
|
||||
const results = resultsPair[0].concat(resultsPair[1]);
|
||||
results.forEach(handleTestResult);
|
||||
|
||||
console.log("\n");
|
||||
|
@ -132,3 +138,4 @@ TestRegister.runTests()
|
|||
|
||||
process.exit(allTestsPassing ? 0 : 1);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue