-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
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
Runtime exception: performance is not defined - with v2.6.9 #9698
Comments
Please provide a repro when reporting bugs |
Hi @posva, |
The thing you linked to is an archived and deprecated example. A repro doesn't have to be jsfiddle, it can be an HTML file (or just the contents of it). It also shouldn't include other dependencies like mocha or vue-test-utils (it could be a problem on that package). Cheers. |
Thanks for writing back! Once you run a static analyze on the file and it throws. Greetings, |
Also getting this. Got a warning from my CI after Vue got upgraded to 2.6.9 (I use Renovate to keep deps up to date). |
It seems that in jsdom environment: > window.performance
Performance {}
> performance
ReferenceError: performance is not defined So we have to use |
Okay, I think I opened the menu before you added the label improvement and clicked outside after you added the has PR label, so it removed it. Funny edge case |
It should be noted that though JSDOM has a @posva 😂 |
Until this is released, a workaround is to add the following lines after JSDOM registration:
|
Sorry for being stupid but where do I add the following line since JSDOM registration is abstracted away in Vue CLI 3 and cli-plugin-unit-mocha (no setup.js)? Thanks for the help... |
Same question. Where do I add the following lines? |
@theonlychase I placed it in my main test entry point Referenced below at
|
- Setting global.performance to window.performance. - See vuejs/vue#9698
- Updating expect to chai.expect. - Removing workaround for vuejs/vue#9698 - Minor logging refactor
Version
2.6.8
Reproduction link
https://jsfiddle.net/chrisvfritz/50wL7mdz/
Steps to reproduce
It is throwing from the vue/dist/vue.js file of the latest version I am currently trying to isolate it, yet it seems connected with the new code added recently. Will add more steps ASAP if you still don't observe it.
Greetings,
Plamen
What is expected?
no error observed
What is actually happening?
an error is observed
The text was updated successfully, but these errors were encountered: