mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-06 21:10:38 +00:00
refactor: move nuxt.close to afterAll
This commit is contained in:
parent
050ed02fee
commit
005f3cb9db
@ -191,11 +191,11 @@ describe('basic browser', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// Close server and ask nuxt to stop listening to file changes
|
// Close server and ask nuxt to stop listening to file changes
|
||||||
test('Closing server and nuxt.js', async () => {
|
afterAll('Closing server and nuxt.js', async () => {
|
||||||
await nuxt.close()
|
await nuxt.close()
|
||||||
})
|
})
|
||||||
|
|
||||||
test('Stop browser', async () => {
|
afterAll('Stop browser', async () => {
|
||||||
await page.close()
|
await page.close()
|
||||||
await browser.close()
|
await browser.close()
|
||||||
})
|
})
|
||||||
|
@ -121,11 +121,11 @@ describe('children patch (browser)', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// Close server and ask nuxt to stop listening to file changes
|
// Close server and ask nuxt to stop listening to file changes
|
||||||
test('Closing server and nuxt.js', async () => {
|
afterAll('Closing server and nuxt.js', async () => {
|
||||||
await nuxt.close()
|
await nuxt.close()
|
||||||
})
|
})
|
||||||
|
|
||||||
test('Stop browser', async () => {
|
afterAll('Stop browser', async () => {
|
||||||
await page.close()
|
await page.close()
|
||||||
await browser.close()
|
await browser.close()
|
||||||
})
|
})
|
||||||
|
@ -48,7 +48,7 @@ describe('basic dev', () => {
|
|||||||
// })
|
// })
|
||||||
|
|
||||||
// Close server and ask nuxt to stop listening to file changes
|
// Close server and ask nuxt to stop listening to file changes
|
||||||
test('Closing server and nuxt.js', async () => {
|
afterAll('Closing server and nuxt.js', async () => {
|
||||||
await nuxt.close()
|
await nuxt.close()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -181,7 +181,7 @@ describe('basic generate', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// Close server and ask nuxt to stop listening to file changes
|
// Close server and ask nuxt to stop listening to file changes
|
||||||
test('Closing server', async () => {
|
afterAll('Closing server', async () => {
|
||||||
await server.close()
|
await server.close()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -266,7 +266,7 @@ describe('basic ssr', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// Close server and ask nuxt to stop listening to file changes
|
// Close server and ask nuxt to stop listening to file changes
|
||||||
test('Closing server and nuxt.js', async () => {
|
afterAll('Closing server and nuxt.js', async () => {
|
||||||
await nuxt.close()
|
await nuxt.close()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -48,7 +48,7 @@ describe('children', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// Close server and ask nuxt to stop listening to file changes
|
// Close server and ask nuxt to stop listening to file changes
|
||||||
test('Closing server and nuxt.js', async () => {
|
afterAll('Closing server and nuxt.js', async () => {
|
||||||
await nuxt.close()
|
await nuxt.close()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -42,7 +42,7 @@ describe('custom-dirs', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// Close server and ask nuxt to stop listening to file changes
|
// Close server and ask nuxt to stop listening to file changes
|
||||||
test('Closing server and nuxt.js', async () => {
|
afterAll('Closing server and nuxt.js', async () => {
|
||||||
await nuxt.close()
|
await nuxt.close()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -89,7 +89,7 @@ describe.skip('debug', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// Close server and ask nuxt to stop listening to file changes
|
// Close server and ask nuxt to stop listening to file changes
|
||||||
test('Closing server and nuxt.js', async () => {
|
afterAll('Closing server and nuxt.js', async () => {
|
||||||
await nuxt.close()
|
await nuxt.close()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -15,7 +15,7 @@ describe('deprecate', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// Close server and ask nuxt to stop listening to file changes
|
// Close server and ask nuxt to stop listening to file changes
|
||||||
test('Closing server and nuxt.js', async () => {
|
afterAll('Closing server and nuxt.js', async () => {
|
||||||
await nuxt.close()
|
await nuxt.close()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -39,7 +39,7 @@ describe('error', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// Close server and ask nuxt to stop listening to file changes
|
// Close server and ask nuxt to stop listening to file changes
|
||||||
test('Closing server and nuxt.js', async () => {
|
afterAll('Closing server and nuxt.js', async () => {
|
||||||
await nuxt.close()
|
await nuxt.close()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -32,7 +32,7 @@ describe('express', () => {
|
|||||||
expect(html.includes('<h1>My component!</h1>')).toBe(true)
|
expect(html.includes('<h1>My component!</h1>')).toBe(true)
|
||||||
})
|
})
|
||||||
|
|
||||||
test('close server', async () => {
|
afterAll('close server', async () => {
|
||||||
await nuxt.close()
|
await nuxt.close()
|
||||||
await new Promise((resolve, reject) => {
|
await new Promise((resolve, reject) => {
|
||||||
server.close(err => err ? reject(err) : resolve())
|
server.close(err => err ? reject(err) : resolve())
|
||||||
|
@ -75,7 +75,7 @@ describe('fallback generate', () => {
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Close server and ask nuxt to stop listening to file changes
|
// Close server and ask nuxt to stop listening to file changes
|
||||||
test('Closing server', async () => {
|
afterAll('Closing server', async () => {
|
||||||
await server.close()
|
await server.close()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -7,6 +7,7 @@ const url = route => 'http://localhost:' + port + route
|
|||||||
let nuxt = null
|
let nuxt = null
|
||||||
// let buildSpies = null
|
// let buildSpies = null
|
||||||
|
|
||||||
|
describe.skip('module', () => {
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
const config = loadFixture('module')
|
const config = loadFixture('module')
|
||||||
nuxt = new Nuxt(config)
|
nuxt = new Nuxt(config)
|
||||||
@ -53,6 +54,7 @@ test('Hooks - Use external middleware before render', async () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// Close server and ask nuxt to stop listening to file changes
|
// Close server and ask nuxt to stop listening to file changes
|
||||||
test('Closing server and nuxt.js', async () => {
|
afterAll('Closing server and nuxt.js', async () => {
|
||||||
await nuxt.close()
|
await nuxt.close()
|
||||||
})
|
})
|
||||||
|
})
|
||||||
|
@ -71,7 +71,7 @@ describe.skip('spa', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// Close server and ask nuxt to stop listening to file changes
|
// Close server and ask nuxt to stop listening to file changes
|
||||||
test('Closing server and nuxt.js', async () => {
|
afterAll('Closing server and nuxt.js', async () => {
|
||||||
await nuxt.close()
|
await nuxt.close()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -102,7 +102,7 @@ describe('ssr', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// Close server and ask nuxt to stop listening to file changes
|
// Close server and ask nuxt to stop listening to file changes
|
||||||
test('Closing server and nuxt.js', async () => {
|
afterAll('Closing server and nuxt.js', async () => {
|
||||||
await nuxt.close()
|
await nuxt.close()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -179,7 +179,7 @@ describe('with-config', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// Close server and ask nuxt to stop listening to file changes
|
// Close server and ask nuxt to stop listening to file changes
|
||||||
test('Closing server and nuxt.js', async () => {
|
afterAll('Closing server and nuxt.js', async () => {
|
||||||
await nuxt.close()
|
await nuxt.close()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user