Skip to content

Commit

Permalink
Fixing reported issue between vue and jsdom
Browse files Browse the repository at this point in the history
- Setting global.performance to window.performance.
- See vuejs/vue#9698
  • Loading branch information
Alex Perkins committed Mar 20, 2019
1 parent 9319886 commit c47835c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name": "@rei/vunit",
"description": "Write unit tests against your Vue components using mocha and vue-test-utils",
"version": "1.4.0",
"version": "1.4.1",
"author": "Alex Perkins <peripateticus.gh@gmail.com>",
"repository": "https://github.com/rei/vunit",
"license": "MIT",
Expand Down
5 changes: 4 additions & 1 deletion setup.js
Expand Up @@ -2,7 +2,10 @@
process.stdout.write('Setting up JSDOM...');
require('jsdom-global')();

// https://github.com/vuejs/vue-test-utils/issues/936#issuecomment-415386167
// See https://github.com/vuejs/vue/issues/9698
global.performance = window.performance;

// See https://github.com/vuejs/vue-test-utils/issues/936#issuecomment-415386167
window.Date = Date;

if (window && window.document) {
Expand Down

0 comments on commit c47835c

Please sign in to comment.