You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a freshly created vue project with the vue-cli. Running the example unit test should pass successfully.
What is actually happening?
The unit test fails with a reference error from vue.runtime.esm.js.
This is happening because vue 2.6.9 (which is installed by npm by default even though it is ahead of the latest stable release) references the global performance attribute that should be available in the browser on line 4251 of vue.runtime.esm.js, but it is not available in the globals provided by jsdom-global. I've made a pull request to jsdom-global (here: rstacruz/jsdom-global#49) to fix its unavailability, but that repo doesn't seem to be actively maintained and it's doubtful that the fix will be merged anytime soon. It would probably be wise to use a different package or a fork of this one. If it helps, you're welcome to use my fork which already has the fix: https://github.com/Cameron637/jsdom-global
The text was updated successfully, but these errors were encountered:
Version
2.6.8
Reproduction link
https://github.com/Cameron637/vue-runtime-error-reproduction
Environment info
Steps to reproduce
Run
npm install
and then runnpm run test:unit
What is expected?
This is a freshly created vue project with the vue-cli. Running the example unit test should pass successfully.
What is actually happening?
The unit test fails with a reference error from vue.runtime.esm.js.
This is happening because vue 2.6.9 (which is installed by npm by default even though it is ahead of the latest stable release) references the global performance attribute that should be available in the browser on line 4251 of vue.runtime.esm.js, but it is not available in the globals provided by jsdom-global. I've made a pull request to jsdom-global (here: rstacruz/jsdom-global#49) to fix its unavailability, but that repo doesn't seem to be actively maintained and it's doubtful that the fix will be merged anytime soon. It would probably be wise to use a different package or a fork of this one. If it helps, you're welcome to use my fork which already has the fix: https://github.com/Cameron637/jsdom-global
The text was updated successfully, but these errors were encountered: