2019-09-05 15:15:27 +00:00
|
|
|
import { getPort, loadFixture, Nuxt, rp } from '../utils'
|
2019-03-20 16:46:09 +00:00
|
|
|
|
|
|
|
let port
|
2019-09-05 15:15:27 +00:00
|
|
|
const url = route => 'http://localhost:' + port + encodeURI(route)
|
2019-03-20 16:46:09 +00:00
|
|
|
|
|
|
|
let nuxt = null
|
|
|
|
|
|
|
|
describe('unicode-base', () => {
|
|
|
|
beforeAll(async () => {
|
|
|
|
const config = await loadFixture('unicode-base')
|
|
|
|
nuxt = new Nuxt(config)
|
|
|
|
await nuxt.ready()
|
|
|
|
|
|
|
|
port = await getPort()
|
|
|
|
await nuxt.server.listen(port, 'localhost')
|
|
|
|
})
|
|
|
|
|
|
|
|
test('/ö/ (router base)', async () => {
|
2019-12-02 15:23:56 +00:00
|
|
|
const { body: response } = await rp(url('/ö/'))
|
2019-03-20 16:46:09 +00:00
|
|
|
|
2019-09-05 15:15:27 +00:00
|
|
|
expect(response).toContain('<h1>Unicode base works!</h1>')
|
2019-03-20 16:46:09 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
// Close server and ask nuxt to stop listening to file changes
|
|
|
|
afterAll(async () => {
|
|
|
|
await nuxt.close()
|
|
|
|
})
|
|
|
|
})
|