diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2023-10-05 21:45:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-05 21:45:11 +0100 |
commit | ac464ead49c9f676d7117baa2ab06433e132e188 (patch) | |
tree | 646d0674bb8d585478d3520b61785c7d453044e3 /cli/tools/test/mod.rs | |
parent | 820e93e3e742a22f010f3200312039c50ae0d63a (diff) |
feat(jupyter): support Deno.test() (#20778)
Diffstat (limited to 'cli/tools/test/mod.rs')
-rw-r--r-- | cli/tools/test/mod.rs | 6 |
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, |