mirror of
https://github.com/nuxt/nuxt.git
synced 2024-12-18 02:07:14 +00:00
25 lines
582 B
JavaScript
25 lines
582 B
JavaScript
import { loadFixture, getPort, Nuxt } from '../utils'
|
|
|
|
let nuxt = null
|
|
|
|
describe('basic https', () => {
|
|
beforeAll(async () => {
|
|
const options = await loadFixture('https')
|
|
nuxt = new Nuxt(options)
|
|
await nuxt.ready()
|
|
|
|
const port = await getPort()
|
|
await nuxt.server.listen(port, '0.0.0.0')
|
|
})
|
|
|
|
test('/', async () => {
|
|
const { html } = await nuxt.server.renderRoute('/')
|
|
expect(html).toContain('<h1>Served over HTTPS!</h1>')
|
|
})
|
|
|
|
// Close server and ask nuxt to stop listening to file changes
|
|
afterAll(async () => {
|
|
await nuxt.close()
|
|
})
|
|
})
|