Nuxt/test/unit/sockets.test.js

22 lines
516 B
JavaScript
Raw Normal View History

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