1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-12 17:09:00 -05:00
denoland-deno/cli/tests/unit/ops_test.ts
Bartek Iwańczuk 28576db10e
refactor: don't expose some ops (#22281)
This commit brings down the number of ops exposed to user
code to 51.
2024-02-06 02:47:10 +01:00

17 lines
475 B
TypeScript

// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
const EXPECTED_OP_COUNT = 51;
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")
}`,
);
}
});