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:
d98762625 2018-05-03 10:20:13 +01:00
parent e50758f0a6
commit 5fb50a1759
6 changed files with 194 additions and 30 deletions

View file

@ -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);
});