Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Only absolute URLs are supported #23

Open
YasBenAll opened this issue Mar 13, 2021 · 0 comments
Open

TypeError: Only absolute URLs are supported #23

YasBenAll opened this issue Mar 13, 2021 · 0 comments

Comments

@YasBenAll
Copy link

YasBenAll commented Mar 13, 2021

When I'm running the command "yarn jest" in the server folder, I'm getting the following error:

TypeError: Only absolute URLs are supported

  11 | const node_fetch_1 = require("node-fetch");
  12 | test("sends invalid back if bad id sent", () => __awaiter(this, void 0, void 0, function* () {
> 13 |     const response = yield node_fetch_1.default(`${process.env.TEST_HOST}/confirm/12083`);
  14 |     const text = yield response.text();
  15 |     expect(text).toEqual("invalid");
  16 | }));

  at getNodeRequestOptions (packages/server/node_modules/node-fetch/lib/index.js:1284:9)
  at packages/server/node_modules/node-fetch/lib/index.js:1370:19
  at Function.fetch [as default] (packages/server/node_modules/node-fetch/lib/index.js:1367:9)
  at Object.<anonymous> (packages/server/dist/server/src/routes/confirmEmail.test.js:13:28)
  at packages/server/dist/server/src/routes/confirmEmail.test.js:7:71
  at Object.<anonymous>.__awaiter (packages/server/dist/server/src/routes/confirmEmail.test.js:3:12)
  at Object.<anonymous> (packages/server/dist/server/src/routes/confirmEmail.test.js:12:49)

I'm not really sure what I'm supposed to do to fix this problem. The url is not being defined correctly apparently. I'm running this on a windows machine.

process.env.TEST_HOST seems to be undefined, so there's something going wrong when defining process.env
unknown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant