From c5c5dea90debcc5ec53b4803ca530558df32e43f Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Fri, 8 Dec 2023 13:03:25 +0530 Subject: chore: use primordials in 40_testing.js (#21422) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit brings back usage of primordials in "40_testing.js" by turning it back into an ES module and using new "lazy loading" functionality of ES modules coming from "deno_core". The same approach was applied to "40_jupyter.js". Co-authored-by: Bartek IwaƄczuk --- cli/worker.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cli/worker.rs') diff --git a/cli/worker.rs b/cli/worker.rs index 5e9d27918..ce9c05701 100644 --- a/cli/worker.rs +++ b/cli/worker.rs @@ -637,13 +637,13 @@ impl CliMainWorkerFactory { ); if self.shared.subcommand.needs_test() { - worker.js_runtime.execute_script_static( + worker.js_runtime.lazy_load_es_module_from_code( "ext:cli/40_testing.js", - include_str!("js/40_testing.js"), + deno_core::FastString::StaticAscii(include_str!("js/40_testing.js")), )?; - worker.js_runtime.execute_script_static( + worker.js_runtime.lazy_load_es_module_from_code( "ext:cli/40_jupyter.js", - include_str!("js/40_jupyter.js"), + deno_core::FastString::StaticAscii(include_str!("js/40_jupyter.js")), )?; } -- cgit v1.2.3