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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to the browser testing recipe to use jsdom directly #3109

Merged
merged 1 commit into from Sep 19, 2022

Conversation

DavidVujic
Copy link
Contributor

@DavidVujic DavidVujic commented Sep 18, 2022

In this PR, I am suggesting to use jsdom directly instead of the browser-env tool. Even though it is a helpful tool, browser-env hasn't been updated in many years as it seems.

I also believe the suggestions here about writing unit tests for JavaScript in the browser are more explicit, by adding only the necessary globals and DOM elements for the particular test target. I like to see it as a TDD friendly approach 馃槃

@novemberborn novemberborn changed the title docs: An update to the browser testing receipt Update to the browser testing recipe to use jsdom directly Sep 19, 2022
@novemberborn
Copy link
Member

Nice one, thanks @DavidVujic!

@novemberborn novemberborn merged commit 2d3f394 into avajs:main Sep 19, 2022
@DavidVujic DavidVujic deleted the docs_browser_unit_tests branch September 19, 2022 08:59
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.

None yet

2 participants