import { resolve } from 'path' import rp from 'request-promise-native' import { Nuxt, Builder } from '..' import styleLoader from '../lib/builder/webpack/style-loader' import { loadConfig } from './helpers/config' const port = 4007 const url = route => 'http://localhost:' + port + route let nuxt = null let builder = null describe('with-config', () => { // Init nuxt.js and create server listening on localhost:4000 beforeAll(async () => { const config = loadConfig('with-config', { dev: false }) nuxt = new Nuxt(config) builder = new Builder(nuxt) await builder.build() await nuxt.listen(port, 'localhost') }, 30000) test('/', async () => { // const logSpy = await interceptLog() 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('