mirror of
https://github.com/nuxt/nuxt.git
synced 2024-12-11 23:07:16 +00:00
432720b8c8
* fix: appveyor test failure * ci: bring back yarn cache * ci: turn off matrix * refactor: use babel instead of esm in jest * refactor: use es modules in fixtures
24 lines
626 B
JavaScript
24 lines
626 B
JavaScript
import { getPort, loadFixture, Nuxt } from '../utils'
|
|
|
|
let port
|
|
let nuxt = null
|
|
|
|
describe('custom-app-template', () => {
|
|
beforeAll(async () => {
|
|
const options = await loadFixture('custom-app-template')
|
|
nuxt = new Nuxt(options)
|
|
port = await getPort()
|
|
await nuxt.listen(port, '0.0.0.0')
|
|
})
|
|
test('/', async () => {
|
|
const { html } = await nuxt.renderRoute('/')
|
|
expect(html.includes('<p>My Template</p>')).toBe(true)
|
|
expect(html.includes('<h1>Custom!</h1>')).toBe(true)
|
|
})
|
|
|
|
// Close server and ask nuxt to stop listening to file changes
|
|
afterAll(async () => {
|
|
await nuxt.close()
|
|
})
|
|
})
|