Added tests for Utils.parseEscapedChars

This commit is contained in:
n1474335 2019-10-16 17:22:48 +01:00
parent 562171ec86
commit adf9772928
5 changed files with 36 additions and 19 deletions

View file

@ -1,19 +0,0 @@
import TestRegister from "../lib/TestRegister.mjs";
import Categories from "../../src/core/config/Categories.json";
import OperationConfig from "../../src/core/config/OperationConfig.json";
import it from "../node/assertionHandler.mjs";
import assert from "assert";
TestRegister.addApiTests([
it("Categories: operations should be in a category", () => {
const catOps = [];
Categories.forEach(cat => {
catOps.push(...cat.ops);
});
for (const op in OperationConfig) {
assert(catOps.includes(op), `'${op}' operation is not present in any category`);
}
}),
]);

View file

@ -17,11 +17,6 @@ import {
} from "../lib/utils.mjs";
import TestRegister from "../lib/TestRegister.mjs";
// Generic tests
import "./Categories.mjs";
// Operation tests
import "./tests/BCD.mjs";
import "./tests/BSON.mjs";
import "./tests/BaconCipher.mjs";
@ -111,8 +106,5 @@ setLongTestFailure();
const logOpsTestReport = logTestReport.bind(null, testStatus);
TestRegister.runApiTests()
.then(logOpsTestReport);
TestRegister.runTests()
.then(logOpsTestReport);