summaryrefslogtreecommitdiff
path: root/cli/worker.rs
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2023-12-08 13:03:25 +0530
committerGitHub <noreply@github.com>2023-12-08 08:33:25 +0100
commitc5c5dea90debcc5ec53b4803ca530558df32e43f (patch)
tree2bd0483edd0a921802999429d6501ecb59bed3ef /cli/worker.rs
parent2235a1a359ffabd72689db58b9af5873e0a9b38a (diff)
chore: use primordials in 40_testing.js (#21422)
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 <biwanczuk@gmail.com>
Diffstat (limited to 'cli/worker.rs')
-rw-r--r--cli/worker.rs8
1 files changed, 4 insertions, 4 deletions
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")),
)?;
}