summaryrefslogtreecommitdiff
path: root/tests/unit/ops_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/ops_test.ts')
-rw-r--r--tests/unit/ops_test.ts17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/unit/ops_test.ts b/tests/unit/ops_test.ts
new file mode 100644
index 000000000..4a0daa0a5
--- /dev/null
+++ b/tests/unit/ops_test.ts
@@ -0,0 +1,17 @@
+// 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")
+ }`,
+ );
+ }
+});