mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 17:37:14 +00:00
22 lines
522 B
JavaScript
22 lines
522 B
JavaScript
import { getPort, loadFixture, Nuxt } from '../utils'
|
|
|
|
let port
|
|
let nuxt = null
|
|
|
|
describe('basic ssr', () => {
|
|
beforeAll(async () => {
|
|
const options = await loadFixture('async-config')
|
|
nuxt = new Nuxt(options)
|
|
await nuxt.ready()
|
|
|
|
port = await getPort()
|
|
await nuxt.server.listen(port, '0.0.0.0')
|
|
})
|
|
|
|
test('/', async () => {
|
|
expect(nuxt.options.head.title).toBe('Async Config!')
|
|
const { html } = await nuxt.server.renderRoute('/')
|
|
expect(html).toContain('<h1>I am ALIVE!</h1>')
|
|
})
|
|
})
|