mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +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 () => {
|
||||
// const logSpy = await interceptLog()
|
||||
nuxt.options.generate.subFolders = false
|
||||
await generator.generate({ build: false })
|
||||
// release()
|
||||
// expect(logSpy.calledWithMatch('DONE')).toBe(true)
|
||||
await expect(generator.generate({ build: false })).resolves.toBeTruthy()
|
||||
})
|
||||
|
||||
test('/users/1.html', async () => {
|
||||
|
@ -41,10 +41,8 @@ describe('fallback generate', () => {
|
||||
})
|
||||
|
||||
test('nuxt re-generating with generate.fallback = false', async () => {
|
||||
// const logSpy = await interceptLog(async () => {
|
||||
nuxt.options.generate.fallback = false
|
||||
await generator.generate({ build: false })
|
||||
// expect(logSpy.calledWithMatch('DONE')).toBe(true)
|
||||
await expect(generator.generate({ build: false })).resolves.toBeTruthy()
|
||||
})
|
||||
|
||||
test('false creates no fallback', async () => {
|
||||
@ -69,7 +67,7 @@ describe('fallback generate', () => {
|
||||
'nuxt re-generating with generate.fallback = "spa-fallback.html"',
|
||||
async () => {
|
||||
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