2018-09-02 09:20:25 +00:00
|
|
|
import { loadFixture, Nuxt } from '../utils'
|
|
|
|
|
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')
|
2019-02-12 13:05:37 +00:00
|
|
|
const nuxt = new Nuxt(options)
|
2019-03-08 20:43:23 +00:00
|
|
|
await nuxt.ready()
|
|
|
|
|
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()
|
|
|
|
})
|
|
|
|
})
|