diff --git a/lib/builder/builder.js b/lib/builder/builder.js index 751a8a7e7b..55cb403eb6 100644 --- a/lib/builder/builder.js +++ b/lib/builder/builder.js @@ -324,6 +324,7 @@ export default class Builder extends Tapable { } else { // --- Production Build --- compiler.run((err, stats) => { + /* istanbul ignore if */ if (err) { return reject(err) } diff --git a/lib/core/nuxt.js b/lib/core/nuxt.js index 6e4c8f534c..229a647dda 100644 --- a/lib/core/nuxt.js +++ b/lib/core/nuxt.js @@ -47,6 +47,7 @@ export default class Nuxt extends Tapable { listen (port = 3000, host = 'localhost') { return new Promise((resolve, reject) => { const server = this.renderer.app.listen({ port, host, exclusive: false }, err => { + /* istanbul ignore if */ if (err) { return reject(err) } @@ -61,6 +62,7 @@ export default class Nuxt extends Tapable { // Destroy server by forcing every connection to be closed server.destroy(err => { debug('server closed') + /* istanbul ignore if */ if (err) { return reject(err) } @@ -93,6 +95,7 @@ export default class Nuxt extends Tapable { async close (callback) { await this.applyPluginsAsync('close') + /* istanbul ignore if */ if (typeof callback === 'function') { await callback() } diff --git a/lib/core/renderer.js b/lib/core/renderer.js index e147522629..b949391cce 100644 --- a/lib/core/renderer.js +++ b/lib/core/renderer.js @@ -132,6 +132,7 @@ export default class Renderer extends Tapable { basedir: this.options.rootDir }, this.options.render.ssr, this.options.build.ssr)) + /* istanbul ignore if */ if (this.options.build.ssr) { // eslint-disable-next-line no-console console.warn('[nuxt] `build.ssr` is deprecated and will be removed in 1.0 release, please use `renderer.ssr` instead!') @@ -174,7 +175,8 @@ export default class Renderer extends Tapable { if (this.options.router.base !== '/' && req.url.indexOf(this.options.router.base) === 0) { req.url = req.url.replace(this.options.router.base, '/') } - // Prevent access to SSR resources + // Prevent access to SSR resources (TODO: write tests) + /* istanbul ignore if */ if (ssrResourceRegex.test(req.url)) { res.statusCode = 404 return res.end()