summaryrefslogtreecommitdiff
path: root/tests/specs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-09-27 12:49:43 -0400
committerGitHub <noreply@github.com>2024-09-27 16:49:43 +0000
commita8d1ab52761516b7f9b6069d6e433254794ed48c (patch)
treeac013b9660c254746cf13ebaed7617ea64520c42 /tests/specs
parent0f617be84a8e9edf73803210c24af43f729a97de (diff)
fix(flags): --allow-all should conflict with lower permissions (#25909)
Using `--allow-all` with other `--allow-x` permission flags should cause an error since `--allow-all` is a superset of `--allow-x`. Closes #25901
Diffstat (limited to 'tests/specs')
-rw-r--r--tests/specs/permission/allow_import/__test__.jsonc5
-rw-r--r--tests/specs/permission/allow_import/success.ts3
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/specs/permission/allow_import/__test__.jsonc b/tests/specs/permission/allow_import/__test__.jsonc
index 21a3cb7b5..4135a24be 100644
--- a/tests/specs/permission/allow_import/__test__.jsonc
+++ b/tests/specs/permission/allow_import/__test__.jsonc
@@ -34,6 +34,11 @@
"output": "run.out",
"exitCode": 1
},
+ "run_allow_all": {
+ "args": "run --quiet --allow-all success.ts",
+ "output": "3\n",
+ "exitCode": 0
+ },
"serve": {
"args": "serve main.ts",
"output": "serve.out",
diff --git a/tests/specs/permission/allow_import/success.ts b/tests/specs/permission/allow_import/success.ts
new file mode 100644
index 000000000..e83ab4b9b
--- /dev/null
+++ b/tests/specs/permission/allow_import/success.ts
@@ -0,0 +1,3 @@
+import { add } from "http://localhost:4545/add.ts";
+
+console.log(add(1, 2));