summaryrefslogtreecommitdiff
path: root/cli/ops/testing.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/ops/testing.rs')
-rw-r--r--cli/ops/testing.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/cli/ops/testing.rs b/cli/ops/testing.rs
index 4a2f48181..7bf0b37a3 100644
--- a/cli/ops/testing.rs
+++ b/cli/ops/testing.rs
@@ -1,5 +1,6 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
+use crate::tools::test::fmt::OP_DETAILS;
use crate::tools::test::TestDescription;
use crate::tools::test::TestEvent;
use crate::tools::test::TestEventSender;
@@ -47,6 +48,7 @@ deno_core::extension!(deno_test,
op_test_op_sanitizer_collect,
op_test_op_sanitizer_finish,
op_test_op_sanitizer_report,
+ op_test_op_sanitizer_get_async_message,
],
options = {
sender: TestEventSender,
@@ -420,3 +422,15 @@ fn op_test_op_sanitizer_report(
))),
}
}
+
+#[op2]
+#[serde]
+fn op_test_op_sanitizer_get_async_message(
+ #[string] op_name: &str,
+) -> (String, Option<String>) {
+ if let Some(output) = OP_DETAILS.get(op_name) {
+ (output[0].to_string(), Some(output[1].to_string()))
+ } else {
+ (op_name.to_string(), None)
+ }
+}