Skip to content
This repository has been archived by the owner on Feb 8, 2019. It is now read-only.

Commit

Permalink
⚡ improvement(test): more easy unit testing
Browse files Browse the repository at this point in the history
  • Loading branch information
kazupon committed Feb 16, 2017
1 parent a56db01 commit d29e70c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
7 changes: 7 additions & 0 deletions template/test/helpers/entry.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Vue from 'vue'
import plugin from '../../src/index'
import 'babel-polyfill' // promise and etc ...

Vue.use(plugin)

window.Vue = Vue
File renamed without changes.
7 changes: 1 addition & 6 deletions template/test/unit/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import Vue from 'vue'
import plugin from '../../src/index'

// import all helpers
const helpersContext = require.context('../helpers', true)
helpersContext.keys().forEach(helpersContext)

// require all test files
const testsContext = require.context('./', true)
const testsContext = require.context('./', true, /\.test/)
testsContext.keys().forEach(testsContext)

Vue.use(plugin)

0 comments on commit d29e70c

Please sign in to comment.