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

Fix #105 test error, fetch requires absolute urls #106

Merged
merged 2 commits into from
Oct 25, 2017

Conversation

tiffon
Copy link
Member

@tiffon tiffon commented Oct 25, 2017

Fix #105.

The node-fetch package was being invoked during the tests. Incidentally, with relative URLs, which was causing warnings to be issued, and in some scenarios, errors.

Was able to reproduce the errors with: $ yarn test -- -i

This PR mocks node-fetch during tests to avert these issues.

Signed-off-by: Joe Farro joef@uber.com

@yurishkuro
Copy link
Member

what is node-fetch?

@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 70.125% when pulling fd95c0c on issue-105-test-error-absolute-urls into 534d81c on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.07%) to 70.021% when pulling fd95c0c on issue-105-test-error-absolute-urls into 534d81c on master.

@tiffon
Copy link
Member Author

tiffon commented Oct 25, 2017

what is node-fetch?

@yurishkuro fetch is the relatively recent alternative to XMLHttpRequest. isomorphic-fetch polyfills it in browsers and adds it to node (not already present because it's a browser API). isomorphic-fetch fetch uses node-fetch, under the hood.

The tests don't need to actually issue HTTP requests, so, I'm mocking it for the tests.

@tiffon tiffon merged commit 4ece4e6 into master Oct 25, 2017
@yurishkuro yurishkuro deleted the issue-105-test-error-absolute-urls branch January 29, 2020 15:10
vvvprabhakar pushed a commit to vvvprabhakar/jaeger-ui that referenced this pull request Jul 5, 2021
…t-error-absolute-urls

Fix jaegertracing#105 test error, fetch requires absolute urls
Signed-off-by: vvvprabhakar <vvvprabhakar@gmail.com>
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

Successfully merging this pull request may close these issues.

3 participants