summaryrefslogtreecommitdiff
path: root/cli/tools/bench.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-06-24 12:00:53 +0200
committerGitHub <noreply@github.com>2022-06-24 12:00:53 +0200
commitd39094913e91e5193f63459d9c5ca6ddc7779477 (patch)
tree597f66d8637644abf2a10422cf7abb35ea3c5598 /cli/tools/bench.rs
parent215f3d4c8e5f694bc6341ca5307b8a3794a32de0 (diff)
fix: don't error if Deno.bench() or Deno.test() are used in run subcommand (#14946)
Diffstat (limited to 'cli/tools/bench.rs')
-rw-r--r--cli/tools/bench.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/cli/tools/bench.rs b/cli/tools/bench.rs
index e88151648..b51938d13 100644
--- a/cli/tools/bench.rs
+++ b/cli/tools/bench.rs
@@ -369,6 +369,11 @@ async fn bench_specifier(
Default::default(),
);
+ worker.js_runtime.execute_script(
+ &located_script_name!(),
+ r#"Deno[Deno.internal].enableTestAndBench()"#,
+ )?;
+
if options.compat_mode {
worker.execute_side_module(&compat::GLOBAL_URL).await?;
worker.execute_side_module(&compat::MODULE_URL).await?;