Closed Schoude closed 3 years ago
Hi @Schoude 👋
Thanks for raising this - the issue was the use of globalThis.location
in superagent which this library wraps ( well... it wraps superdeno which wraps superagent ).
Before the introduction of the the --location <href>
flag, globalThis.location
used to just be undefined
. Now it throws if access is attempted without the flag, hence your issue.
I have side-stepped the issue upstream and pulled down the latest deps into this module, so please give https://deno.land/x/superoak@3.1.0 a go, and re-open if you find you still have issues!
HI @cmorten,
I just updated the version and everything works now without the --location <href>
hack mentioned in the issue.
Thanks for resolving this so fast! 😃
Issue
Setup:
When running the tests with
deno test --allow-net app.test.ts
I get the above error message.Details
Following the example I set up the tests and ran
deno test --allow-net app.test.ts
but this error occurs.Hack to get the tests run again
Passing in any random "valid" URL like
deno test --allow-net --location http://anything app.test.ts
makes the tests run again.It even runs when I just pass in
--location http://a
. I hope this only has to do with the Deno update to 1.7.2.Thanks in advance for looking into it. :)