import rp from 'request-promise-native' import { Nuxt } from '..' import { loadFixture, getPort } from './utils' let port const url = route => 'http://localhost:' + port + route let nuxt = null describe('with-config', () => { beforeAll(async () => { const config = loadFixture('with-config') nuxt = new Nuxt(config) port = await getPort() await nuxt.listen(port, 'localhost') }) test('/', async () => { // const logSpy = await interceptLog() const { html } = await nuxt.renderRoute('/') expect(html.includes('

I have custom configurations

')).toBe(true) // release() // expect(logSpy.calledOnce).toBe(true) // expect(logSpy.args[0][0]).toBe('Test plugin!') }) test('/ (global styles inlined)', async () => { const { html } = await nuxt.renderRoute('/') expect(html.includes('.global-css-selector')).toBe(true) }) test.skip('/ (preload fonts)', async () => { const { html } = await nuxt.renderRoute('/') expect(html.includes( ' { const { html } = await nuxt.renderRoute('/') expect(html.includes('

Made by Nuxt.js team

')).toBe(true) }) test('/ (custom build.publicPath)', async () => { const { html } = await nuxt.renderRoute('/') expect(html.includes('