mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 06:05:11 +00:00
chore(cli): fix typo (#8674)
This commit is contained in:
parent
61ed873125
commit
083505603f
@ -24,7 +24,7 @@ export async function serve (cmd) {
|
||||
const distStat = await fs.stat(options.generate.dir).catch(err => null) // eslint-disable-line node/handle-callback-err
|
||||
const distPath = join(options.generate.dir.replace(process.cwd() + sep, ''), sep)
|
||||
if (!distStat || !distStat.isDirectory()) {
|
||||
throw new Error('Output directory `' + distPath + '` does not exists, please use `nuxt generate` before `nuxt start` for static target.')
|
||||
throw new Error('Output directory `' + distPath + '` does not exist, please use `nuxt generate` before `nuxt start` for static target.')
|
||||
}
|
||||
const app = connect()
|
||||
app.use(compression({ threshold: 0 }))
|
||||
|
@ -22,7 +22,7 @@ describe('serve', () => {
|
||||
test('error if dist/ does not exists', () => {
|
||||
mockGetNuxtConfig({ target: TARGETS.static })
|
||||
const cmd = NuxtCommand.from(serve)
|
||||
expect(cmd.run()).rejects.toThrow(new Error('Output directory `dist/` does not exists, please use `nuxt generate` before `nuxt start` for static target.'))
|
||||
expect(cmd.run()).rejects.toThrow(new Error('Output directory `dist/` does not exist, please use `nuxt generate` before `nuxt start` for static target.'))
|
||||
})
|
||||
|
||||
test('no error if dist/ dir exists', async () => {
|
||||
|
Loading…
Reference in New Issue
Block a user