From 38ef413e5d417c95ccf7cb58c585777511ffdb25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Wed, 21 Dec 2016 15:27:30 +0100 Subject: [PATCH] test for nuxt.js --- lib/nuxt.js | 3 +++ test/fixtures/with-config/store/index.js | 17 +++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 test/fixtures/with-config/store/index.js diff --git a/lib/nuxt.js b/lib/nuxt.js index 938656041f..a3ca5b06c8 100644 --- a/lib/nuxt.js +++ b/lib/nuxt.js @@ -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() } diff --git a/test/fixtures/with-config/store/index.js b/test/fixtures/with-config/store/index.js new file mode 100644 index 0000000000..e5ad937c65 --- /dev/null +++ b/test/fixtures/with-config/store/index.js @@ -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