We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug If you are switching from jsdom to happy-dom you will find differences in the implementation of how the navigator is used.
With jsdom you are able to use some spy on the navigator, happy-dom does not support it:
jest.spyOn(window.navigator, 'onLine', 'get').mockReturnValue(true);
To Reproduce Add the code line to a spec and run it.
Expected behavior A switch between jsdom and happy-dom should be possible without any changes in the source code.
Additional context Compare with jsdom https://github.com/jsdom/jsdom/blob/master/lib/jsdom/living/navigator/Navigator-impl.js https://github.com/jsdom/jsdom/blob/master/lib/jsdom/living/navigator/NavigatorOnLine-impl.js
The text was updated successfully, but these errors were encountered:
capricorn86#755@patch: Replace properties by getter in Navigator.
26d8246
ae5258a
ee63e9f
Merge pull request #756 from CSchulz/patch-4
2b8de28
#755@patch: Replace properties by getter in Navigator.
Successfully merging a pull request may close this issue.
Describe the bug
If you are switching from jsdom to happy-dom you will find differences in the implementation of how the navigator is used.
With jsdom you are able to use some spy on the navigator, happy-dom does not support it:
jest.spyOn(window.navigator, 'onLine', 'get').mockReturnValue(true);
To Reproduce
Add the code line to a spec and run it.
Expected behavior
A switch between jsdom and happy-dom should be possible without any changes in the source code.
Additional context
Compare with jsdom
https://github.com/jsdom/jsdom/blob/master/lib/jsdom/living/navigator/Navigator-impl.js
https://github.com/jsdom/jsdom/blob/master/lib/jsdom/living/navigator/NavigatorOnLine-impl.js
The text was updated successfully, but these errors were encountered: