test for nuxt.js

This commit is contained in:
Sébastien Chopin 2016-12-21 15:27:30 +01:00
parent b74d452f23
commit 38ef413e5d
2 changed files with 20 additions and 0 deletions

View File

@ -84,18 +84,21 @@ class Nuxt {
close (callback) {
let promises = []
/* istanbul ignore if */
if (this.webpackDevMiddleware) {
const p = new Promise((resolve, reject) => {
this.webpackDevMiddleware.close(() => resolve())
})
promises.push(p)
}
/* istanbul ignore if */
if (this.webpackServerWatcher) {
const p = new Promise((resolve, reject) => {
this.webpackServerWatcher.close(() => resolve())
})
promises.push(p)
}
/* istanbul ignore if */
if (this.pagesFilesWatcher) {
this.pagesFilesWatcher.close()
}

View File

@ -0,0 +1,17 @@
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const store = new Vuex.Store({
state: {
counter: 0
},
mutations: {
increment (state) {
state.counter++
}
}
})
export default store