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) { close (callback) {
let promises = [] let promises = []
/* istanbul ignore if */
if (this.webpackDevMiddleware) { if (this.webpackDevMiddleware) {
const p = new Promise((resolve, reject) => { const p = new Promise((resolve, reject) => {
this.webpackDevMiddleware.close(() => resolve()) this.webpackDevMiddleware.close(() => resolve())
}) })
promises.push(p) promises.push(p)
} }
/* istanbul ignore if */
if (this.webpackServerWatcher) { if (this.webpackServerWatcher) {
const p = new Promise((resolve, reject) => { const p = new Promise((resolve, reject) => {
this.webpackServerWatcher.close(() => resolve()) this.webpackServerWatcher.close(() => resolve())
}) })
promises.push(p) promises.push(p)
} }
/* istanbul ignore if */
if (this.pagesFilesWatcher) { if (this.pagesFilesWatcher) {
this.pagesFilesWatcher.close() 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