summaryrefslogtreecommitdiff
path: root/cli/tools/test/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tools/test/mod.rs')
-rw-r--r--cli/tools/test/mod.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/cli/tools/test/mod.rs b/cli/tools/test/mod.rs
index 66e3a5870..b3aadc1e7 100644
--- a/cli/tools/test/mod.rs
+++ b/cli/tools/test/mod.rs
@@ -473,6 +473,12 @@ pub async fn test_specifier(
Ok(())
}
+pub fn worker_has_tests(worker: &mut MainWorker) -> bool {
+ let state_rc = worker.js_runtime.op_state();
+ let state = state_rc.borrow();
+ !state.borrow::<ops::testing::TestContainer>().0.is_empty()
+}
+
pub async fn run_tests_for_worker(
worker: &mut MainWorker,
specifier: &ModuleSpecifier,