Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove imported ops from Deno.core.ops #22194

Merged
merged 11 commits into from
Jan 31, 2024
Merged
Prev Previous commit
Next Next commit
update the test
  • Loading branch information
bartlomieju committed Jan 30, 2024
commit b9b821547b7b8d9a48739ba8f124ef73b8c62ac8
8 changes: 6 additions & 2 deletions cli/tests/unit/ops_test.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.

const EXPECTED_OP_COUNT = 151;

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 !== 200) {
if (opNames.length !== EXPECTED_OP_COUNT) {
throw new Error(
`Expected 200 ops, but got ${opNames.length}:\n${opNames.join("\n")}`,
`Expected ${EXPECTED_OP_COUNT} ops, but got ${opNames.length}:\n${
opNames.join("\n")
}`,
);
}
});
Loading
Loading