mirror of
https://github.com/gchq/CyberChef.git
synced 2024-11-02 22:21:01 +01:00
20 lines
632 B
JavaScript
20 lines
632 B
JavaScript
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`);
|
|
}
|
|
}),
|
|
|
|
]);
|