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

jsdom plugin is not correctly set up to handle bundled scenarios #113

Open
matt-gadd opened this issue Jul 28, 2018 · 0 comments
Open

jsdom plugin is not correctly set up to handle bundled scenarios #113

matt-gadd opened this issue Jul 28, 2018 · 0 comments
Labels

Comments

@matt-gadd
Copy link
Contributor

matt-gadd commented Jul 28, 2018

Bug
The jsdom plugin in cli-test-intern is not currently implemented correctly for bundles (ie using dojo test -c local).

It imports both @dojo/shim and @dojo/has modules to set things on, but those modules have no correlation with what is actually bundled. We should likely favour setting things directly on the global in node here (given the jsdom plugin is only used in a node env anyway). I'm not sure how important the has flag for jsdom is either so perhaps we can drop that?

It also seems like due to our global implementation in dojo/shim (which checks for a global first over a window) and the way we are just attaching the jsdom window to global.window results in this not working. To fix we could either change our global implementation to test for window first, or we have to spread the jsdom window over the node global. If we are going to do the latter we should consider https://github.com/rstacruz/jsdom-global perhaps

@matt-gadd matt-gadd added the bug label Jul 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant