0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-01 04:06:42 -05:00
denoland-deno/cli/tests/unit/ops_test.ts
2024-02-06 13:37:20 +01:00

17 lines
475 B
TypeScript

// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
const EXPECTED_OP_COUNT = 50;
Deno.test(function checkExposedOps() {
// @ts-ignore TS doesn't allow to index with symbol
const core = Deno[Deno.internal].core;
const opNames = Object.keys(core.ops);
if (opNames.length !== EXPECTED_OP_COUNT) {
throw new Error(
`Expected ${EXPECTED_OP_COUNT} ops, but got ${opNames.length}:\n${
opNames.join("\n")
}`,
);
}
});