2018-09-02 09:20:25 +00:00
|
|
|
import { loadFixture, Nuxt } from '../utils'
|
|
|
|
|
|
|
|
let nuxt = null
|
|
|
|
|
2019-01-29 11:29:55 +00:00
|
|
|
describe.posix('basic sockets', () => {
|
2019-01-28 14:30:04 +00:00
|
|
|
test('/', async () => {
|
2018-09-02 09:20:25 +00:00
|
|
|
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
|
|
|
|
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
|
|
|
|
|
|
|
await nuxt.close()
|
|
|
|
})
|
|
|
|
})
|