fix: correct afterall

This commit is contained in:
Clark Du 2018-03-30 17:20:16 +08:00
parent 8c9a3e70e4
commit d5ca0a5639
No known key found for this signature in database
GPG Key ID: D0E5986AF78B86D9
16 changed files with 20 additions and 18 deletions

View File

@ -191,11 +191,12 @@ describe('basic browser', () => {
})
// Close server and ask nuxt to stop listening to file changes
afterAll('Closing server and nuxt.js', async () => {
afterAll(async () => {
await nuxt.close()
})
afterAll('Stop browser', async () => {
// Stop browser
afterAll(async () => {
await page.close()
await browser.close()
})

View File

@ -121,11 +121,12 @@ describe('children patch (browser)', () => {
})
// Close server and ask nuxt to stop listening to file changes
afterAll('Closing server and nuxt.js', async () => {
afterAll(async () => {
await nuxt.close()
})
afterAll('Stop browser', async () => {
// Stop browser
afterAll(async () => {
await page.close()
await browser.close()
})

View File

@ -48,7 +48,7 @@ describe('basic dev', () => {
// })
// Close server and ask nuxt to stop listening to file changes
afterAll('Closing server and nuxt.js', async () => {
afterAll(async () => {
await nuxt.close()
})
})

View File

@ -181,7 +181,7 @@ describe('basic generate', () => {
})
// Close server and ask nuxt to stop listening to file changes
afterAll('Closing server', async () => {
afterAll(async () => {
await server.close()
})
})

View File

@ -266,7 +266,7 @@ describe('basic ssr', () => {
})
// Close server and ask nuxt to stop listening to file changes
afterAll('Closing server and nuxt.js', async () => {
afterAll(async () => {
await nuxt.close()
})
})

View File

@ -48,7 +48,7 @@ describe('children', () => {
})
// Close server and ask nuxt to stop listening to file changes
afterAll('Closing server and nuxt.js', async () => {
afterAll(async () => {
await nuxt.close()
})
})

View File

@ -42,7 +42,7 @@ describe('custom-dirs', () => {
})
// Close server and ask nuxt to stop listening to file changes
afterAll('Closing server and nuxt.js', async () => {
afterAll(async () => {
await nuxt.close()
})
})

View File

@ -89,7 +89,7 @@ describe.skip('debug', () => {
})
// Close server and ask nuxt to stop listening to file changes
afterAll('Closing server and nuxt.js', async () => {
afterAll(async () => {
await nuxt.close()
})
})

View File

@ -17,7 +17,7 @@ describe.skip('deprecate', () => {
test()
// Close server and ask nuxt to stop listening to file changes
afterAll('Closing server and nuxt.js', async () => {
afterAll(async () => {
await nuxt.close()
})
})

View File

@ -39,7 +39,7 @@ describe('error', () => {
})
// Close server and ask nuxt to stop listening to file changes
afterAll('Closing server and nuxt.js', async () => {
afterAll(async () => {
await nuxt.close()
})
})

View File

@ -32,7 +32,7 @@ describe('express', () => {
expect(html.includes('<h1>My component!</h1>')).toBe(true)
})
afterAll('close server', async () => {
afterAll(async () => {
await nuxt.close()
await new Promise((resolve, reject) => {
server.close(err => err ? reject(err) : resolve())

View File

@ -75,7 +75,7 @@ describe('fallback generate', () => {
)
// Close server and ask nuxt to stop listening to file changes
afterAll('Closing server', async () => {
afterAll(async () => {
await server.close()
})
})

View File

@ -54,7 +54,7 @@ describe.skip('module', () => {
})
// Close server and ask nuxt to stop listening to file changes
afterAll('Closing server and nuxt.js', async () => {
afterAll(async () => {
await nuxt.close()
})
})

View File

@ -71,7 +71,7 @@ describe.skip('spa', () => {
})
// Close server and ask nuxt to stop listening to file changes
afterAll('Closing server and nuxt.js', async () => {
afterAll(async () => {
await nuxt.close()
})
})

View File

@ -102,7 +102,7 @@ describe('ssr', () => {
})
// Close server and ask nuxt to stop listening to file changes
afterAll('Closing server and nuxt.js', async () => {
afterAll(async () => {
await nuxt.close()
})
})

View File

@ -179,7 +179,7 @@ describe('with-config', () => {
})
// Close server and ask nuxt to stop listening to file changes
afterAll('Closing server and nuxt.js', async () => {
afterAll(async () => {
await nuxt.close()
})
})