mirror of
https://github.com/denoland/deno.git
synced 2024-11-29 16:30:56 -05:00
6c15dc3f06
This test is not needed because the op is not available to user code anymore. This brings number of ops exposed to user code down to 15.
17 lines
475 B
TypeScript
17 lines
475 B
TypeScript
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
|
|
const EXPECTED_OP_COUNT = 15;
|
|
|
|
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")
|
|
}`,
|
|
);
|
|
}
|
|
});
|