2018-09-02 09:20:25 +00:00
|
|
|
import { loadFixture, Nuxt } from '../utils'
|
|
|
|
|
|
|
|
let nuxt = null
|
|
|
|
|
2018-09-13 09:07:34 +00:00
|
|
|
describe.skip.win('basic sockets', () => {
|
2018-09-02 09:20:25 +00:00
|
|
|
beforeAll(async () => {
|
|
|
|
const options = await loadFixture('sockets')
|
|
|
|
nuxt = new Nuxt(options)
|
2018-10-30 20:42:53 +00:00
|
|
|
await nuxt.server.listen()
|
2018-09-02 09:20:25 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
test('/', async () => {
|
2018-10-30 20:42:53 +00:00
|
|
|
const { html } = await nuxt.server.renderRoute('/')
|
2018-11-08 09:41:24 +00:00
|
|
|
expect(html).toContain('<h1>Served over sockets!</h1>')
|
2018-09-02 09:20:25 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
// Close server and ask nuxt to stop listening to file changes
|
|
|
|
afterAll(async () => {
|
|
|
|
await nuxt.close()
|
|
|
|
})
|
|
|
|
})
|