Ignore webpack midd for tests

This commit is contained in:
Sébastien Chopin 2016-12-21 15:32:47 +01:00
parent 38ef413e5d
commit 957e730bc4
1 changed files with 4 additions and 0 deletions

View File

@ -116,6 +116,7 @@ exports.build = function * () {
/*
** Generate .nuxt/dist/ files
*/
/* istanbul ignore if */
if (this.dev) {
debug('Adding webpack middlewares...')
createWebpackMiddlewares.call(this)
@ -254,6 +255,7 @@ function getWebpackServerConfig () {
return serverWebpackConfig.call(this)
}
/* istanbul ignore next */
function createWebpackMiddlewares () {
const clientConfig = getWebpackClientConfig.call(this)
// setup on the fly compilation + hot-reload
@ -276,6 +278,7 @@ function createWebpackMiddlewares () {
this.webpackHotMiddleware = pify(require('webpack-hot-middleware')(clientCompiler))
}
/* istanbul ignore next */
function webpackWatchAndUpdate () {
const MFS = require('memory-fs') // <- dependencies of webpack
const mfs = new MFS()
@ -338,6 +341,7 @@ function createRenderer (bundle) {
this.renderToStream = this.renderer.renderToStream
}
/* istanbul ignore next */
function watchPages () {
const patterns = [ r(this.srcDir, 'pages/*.vue'), r(this.srcDir, 'pages/**/*.vue') ]
const options = {