mirror of
https://github.com/denoland/deno.git
synced 2024-12-02 17:01:14 -05:00
edab1bb927
This commit removes some not really necessary FFI tests and in effect removes them from being accessible from the user code. This lowers the number of ops accessible to user code to 16.
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 = 16;
|
|
|
|
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")
|
|
}`,
|
|
);
|
|
}
|
|
});
|