From 60688c563e6d02813b021ad91132fe1eb3f103b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 23 Jan 2024 23:51:07 +0100 Subject: feat: import.meta.filename and import.meta.dirname (#22061) This commit adds `import.meta.filename` and `import.meta.dirname` APIs. These APIs return string representation of filename and containing dirname. They are only defined for local modules (modules that have `file:///` scheme). Example: ```ts console.log(import.meta.filename, import.meta.dirname) ``` Unix: ``` $ deno run /dev/my_module.ts /dev/my_module.ts /dev/ ``` Windows: ``` $ deno run C:\dev\my_module.ts C:\dev\my_module.ts C:\ ``` --- cli/tests/integration/run_tests.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'cli/tests/integration/run_tests.rs') diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs index 429ec2a04..3a2b46133 100644 --- a/cli/tests/integration/run_tests.rs +++ b/cli/tests/integration/run_tests.rs @@ -1493,6 +1493,7 @@ itest!(if_main { itest!(import_meta { args: "run --quiet --reload --import-map=run/import_meta/importmap.json run/import_meta/main.ts", output: "run/import_meta/main.out", + http_server: true, }); itest!(main_module { -- cgit v1.2.3