Skip to content

Commit

Permalink
test: fix after update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Scrum committed May 8, 2020
1 parent d4f9141 commit 92274e1
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions test/helpers/setup.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
require('browser-env')();
// ./test/_setup.js

// Set up JSDom.
require('jsdom-global')()

// Fix the Date object, see <https://github.com/vuejs/vue-test-utils/issues/936#issuecomment-415386167>.
window.Date = Date

// Setup browser environment
const hooks = require('require-extension-hooks');
const Vue = require('vue');

// Setup Vue.js to remove production tip
Vue.config.productionTip = false;

// Setup vue files to be processed by `require-extension-hooks-vue`
hooks('vue').plugin('vue').push();
hooks(['vue', 'js']).plugin('babel').push();
// Setup vue and js files to be processed by `require-extension-hooks-babel`
hooks(['vue', 'js']).exclude(({filename}) => filename.match(/\/node_modules\//)).plugin('babel').push();

0 comments on commit 92274e1

Please sign in to comment.