summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/070_location.ts
diff options
context:
space:
mode:
authorKayla Washburn <mckayla@hey.com>2022-08-10 12:57:30 -0600
committerGitHub <noreply@github.com>2022-08-10 12:57:30 -0600
commit08061b60d9be2b6990d1134aa5b94ec36f9266aa (patch)
tree88f4621b251d74cdb179afd1af07cc446951ca08 /cli/tests/testdata/070_location.ts
parentf16fe443038454ef49641b097c0a0161a97bd1c3 (diff)
fix: allow setting `globalThis.location` when no `--location` is provided (#15448)
Diffstat (limited to 'cli/tests/testdata/070_location.ts')
-rw-r--r--cli/tests/testdata/070_location.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/cli/tests/testdata/070_location.ts b/cli/tests/testdata/070_location.ts
index 149de5423..05e5abdf1 100644
--- a/cli/tests/testdata/070_location.ts
+++ b/cli/tests/testdata/070_location.ts
@@ -1,7 +1,15 @@
+// deno-lint-ignore-file no-global-assign
console.log(Location);
console.log(Location.prototype);
console.log(location);
try {
+ location = {};
+} catch (error) {
+ if (error instanceof Error) {
+ console.log(error.toString());
+ }
+}
+try {
location.hostname = "bar";
} catch (error) {
if (error instanceof Error) {