mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 22:25:12 +00:00
432720b8c8
* fix: appveyor test failure * ci: bring back yarn cache * ci: turn off matrix * refactor: use babel instead of esm in jest * refactor: use es modules in fixtures
21 lines
511 B
JavaScript
21 lines
511 B
JavaScript
import { loadFixture, Nuxt, Generator } from '../utils'
|
|
|
|
describe('basic fail generate', () => {
|
|
test('Fail with routes() which throw an error', async () => {
|
|
const options = await loadFixture('basic', {
|
|
generate: {
|
|
routes() {
|
|
throw new Error('Not today!')
|
|
}
|
|
}
|
|
})
|
|
|
|
const nuxt = new Nuxt(options)
|
|
const generator = new Generator(nuxt)
|
|
|
|
await generator.generate({ build: false }).catch((e) => {
|
|
expect(e.message).toBe('Not today!')
|
|
})
|
|
})
|
|
})
|