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 test errors due to missing hosts file entry #161

Merged
merged 1 commit into from
Aug 18, 2022

Conversation

markcellus
Copy link
Owner

@markcellus markcellus commented Aug 18, 2022

This fixes test errors that were present when running npm run test:ts. The errors were preventing creation of new preleases via release-it, since tests must be run and must pass before a prerelease can be generated and published.

Adding a missing entry to the /etc/hosts file was required to get it working. Please feel free to let me know if there's anything that needs clarification. 🚀

Before running tests, you'll need to add the following entry to your `/etc/hosts` file on your machine:

```
127.0.0.1 foo.bar.localhost
Copy link
Owner Author

@markcellus markcellus Aug 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding this entry to the /etc/hosts file is necessary to get tests to pass. Without it, tests can't seem to find the /test/resources/empty_sw.js file. I'm assuming it can't find it because foo.bar.localhost wasn't mapped to what's normally default localhost (127.0.0.1).

@markcellus markcellus force-pushed the firefox_linux_fixes branch 2 times, most recently from 7ba7d00 to de0d77a Compare August 18, 2022 10:57
@markcellus markcellus changed the title Fix test errors when using Firefox ESR on Linux Fix test errors due to missing hosts file entry Aug 18, 2022
Copy link
Collaborator

@keithamus keithamus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@koddsson and I couldn't remember how/why this was needed. I think because localhost doesn't allow for serviceworkers, so you need to have a full domain.

@markcellus markcellus merged commit ea61b64 into next Aug 18, 2022
@markcellus markcellus deleted the firefox_linux_fixes branch August 18, 2022 13:35
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.

2 participants