mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 09:27:13 +00:00
coverage
This commit is contained in:
parent
8aaadfae79
commit
2c12b37bf6
@ -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)
|
||||
}
|
||||
|
@ -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()
|
||||
}
|
||||
|
@ -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!')
|
||||
@ -176,7 +177,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()
|
||||
|
Loading…
Reference in New Issue
Block a user