summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/integration/js_unit_tests.rs1
-rw-r--r--cli/tests/unit/ops_test.ts17
2 files changed, 18 insertions, 0 deletions
diff --git a/cli/tests/integration/js_unit_tests.rs b/cli/tests/integration/js_unit_tests.rs
index 7680ee7a1..15d377aaa 100644
--- a/cli/tests/integration/js_unit_tests.rs
+++ b/cli/tests/integration/js_unit_tests.rs
@@ -61,6 +61,7 @@ util::unit_test_factory!(
network_interfaces_test,
opcall_test,
os_test,
+ ops_test,
path_from_url_test,
performance_test,
permissions_test,
diff --git a/cli/tests/unit/ops_test.ts b/cli/tests/unit/ops_test.ts
new file mode 100644
index 000000000..e62d85728
--- /dev/null
+++ b/cli/tests/unit/ops_test.ts
@@ -0,0 +1,17 @@
+// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
+
+const EXPECTED_OP_COUNT = 157;
+
+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")
+ }`,
+ );
+ }
+});