mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
refactor: promise in test is passed
This commit is contained in:
parent
b6c45b81a9
commit
e9a810a253
@ -145,11 +145,8 @@ describe('basic generate', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
test('nuxt re-generating with no subfolders', async () => {
|
test('nuxt re-generating with no subfolders', async () => {
|
||||||
// const logSpy = await interceptLog()
|
|
||||||
nuxt.options.generate.subFolders = false
|
nuxt.options.generate.subFolders = false
|
||||||
await generator.generate({ build: false })
|
await expect(generator.generate({ build: false })).resolves.toBeTruthy()
|
||||||
// release()
|
|
||||||
// expect(logSpy.calledWithMatch('DONE')).toBe(true)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
test('/users/1.html', async () => {
|
test('/users/1.html', async () => {
|
||||||
|
@ -41,10 +41,8 @@ describe('fallback generate', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
test('nuxt re-generating with generate.fallback = false', async () => {
|
test('nuxt re-generating with generate.fallback = false', async () => {
|
||||||
// const logSpy = await interceptLog(async () => {
|
|
||||||
nuxt.options.generate.fallback = false
|
nuxt.options.generate.fallback = false
|
||||||
await generator.generate({ build: false })
|
await expect(generator.generate({ build: false })).resolves.toBeTruthy()
|
||||||
// expect(logSpy.calledWithMatch('DONE')).toBe(true)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
test('false creates no fallback', async () => {
|
test('false creates no fallback', async () => {
|
||||||
@ -69,7 +67,7 @@ describe('fallback generate', () => {
|
|||||||
'nuxt re-generating with generate.fallback = "spa-fallback.html"',
|
'nuxt re-generating with generate.fallback = "spa-fallback.html"',
|
||||||
async () => {
|
async () => {
|
||||||
nuxt.options.generate.fallback = 'spa-fallback.html'
|
nuxt.options.generate.fallback = 'spa-fallback.html'
|
||||||
await generator.generate({ build: false })
|
await expect(generator.generate({ build: false })).resolves.toBeTruthy()
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user