diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2021-01-17 21:58:23 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-18 08:58:23 +1100 |
commit | 81d73f2987c65463c0f2653f31d3d29d8db1986c (patch) | |
tree | ca85028b8658860339aa7f98fc9df8586302a320 /cli/tests | |
parent | 2b5b93158c1fc8887b2d4e4d1e4fc3d71c795027 (diff) |
fix(cli): Check permissions for Deno.emit() (#9139)
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/080_deno_emit_permissions.ts | 1 | ||||
-rw-r--r-- | cli/tests/080_deno_emit_permissions.ts.out | 2 | ||||
-rw-r--r-- | cli/tests/integration_tests.rs | 6 |
3 files changed, 9 insertions, 0 deletions
diff --git a/cli/tests/080_deno_emit_permissions.ts b/cli/tests/080_deno_emit_permissions.ts new file mode 100644 index 000000000..dc550cffb --- /dev/null +++ b/cli/tests/080_deno_emit_permissions.ts @@ -0,0 +1 @@ +await Deno.emit(new URL("001_hello.js", import.meta.url).href); diff --git a/cli/tests/080_deno_emit_permissions.ts.out b/cli/tests/080_deno_emit_permissions.ts.out new file mode 100644 index 000000000..cc8d13af9 --- /dev/null +++ b/cli/tests/080_deno_emit_permissions.ts.out @@ -0,0 +1,2 @@ +[WILDCARD]error: Uncaught (in promise) PermissionDenied: read access to "[WILDCARD]001_hello.js", run again with the --allow-read flag +[WILDCARD] diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs index 9c64a9e07..226bf9b9b 100644 --- a/cli/tests/integration_tests.rs +++ b/cli/tests/integration_tests.rs @@ -2656,6 +2656,12 @@ itest!(_079_location_authentication { output: "079_location_authentication.ts.out", }); +itest!(_080_deno_emit_permissions { + args: "run --unstable 080_deno_emit_permissions.ts", + output: "080_deno_emit_permissions.ts.out", + exit_code: 1, +}); + itest!(js_import_detect { args: "run --quiet --reload js_import_detect.ts", output: "js_import_detect.ts.out", |