Skip to content

Commit c47835c

Browse files
author
Alex Perkins
committed
Fixing reported issue between vue and jsdom
- Setting global.performance to window.performance. - See vuejs/vue#9698
1 parent 9319886 commit c47835c

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@rei/vunit",
33
"description": "Write unit tests against your Vue components using mocha and vue-test-utils",
4-
"version": "1.4.0",
4+
"version": "1.4.1",
55
"author": "Alex Perkins <[email protected]>",
66
"repository": "https://github.com/rei/vunit",
77
"license": "MIT",

setup.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
process.stdout.write('Setting up JSDOM...');
33
require('jsdom-global')();
44

5-
// https://github.com/vuejs/vue-test-utils/issues/936#issuecomment-415386167
5+
// See https://github.com/vuejs/vue/issues/9698
6+
global.performance = window.performance;
7+
8+
// See https://github.com/vuejs/vue-test-utils/issues/936#issuecomment-415386167
69
window.Date = Date;
710

811
if (window && window.document) {

0 commit comments

Comments
 (0)