mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-23 16:26:16 -04:00
Added tests for Utils.parseEscapedChars
This commit is contained in:
parent
562171ec86
commit
adf9772928
5 changed files with 36 additions and 19 deletions
19
tests/node/tests/Categories.mjs
Normal file
19
tests/node/tests/Categories.mjs
Normal file
|
@ -0,0 +1,19 @@
|
|||
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 "../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`);
|
||||
}
|
||||
}),
|
||||
|
||||
]);
|
Loading…
Add table
Add a link
Reference in a new issue