summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/unit/metrics_test.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/cli/tests/unit/metrics_test.ts b/cli/tests/unit/metrics_test.ts
index 9fa37e99b..25c63dbc1 100644
--- a/cli/tests/unit/metrics_test.ts
+++ b/cli/tests/unit/metrics_test.ts
@@ -69,3 +69,12 @@ unitTest(
assert(metrics.opsDispatchedAsync === metrics.opsCompletedAsync);
},
);
+
+// Test that ops from op_crates have metrics (via OpMiddleware)
+unitTest(function metricsForOpCrates(): void {
+ const _ = new URL("https://deno.land");
+
+ const m1 = Deno.metrics().ops["op_url_parse"];
+ assert(m1.opsDispatched > 0);
+ assert(m1.opsCompleted > 0);
+});