import { Nuxt, Builder } from '..' import { loadFixture, getPort } from './utils' let port const url = route => 'http://localhost:' + port + route let nuxt = null describe('basic dev', () => { beforeAll(async () => { const config = loadFixture('basic', { buildDir: '.nuxt-dev' }) config.dev = true nuxt = new Nuxt(config) new Builder(nuxt).build() port = await getPort() await nuxt.listen(port, 'localhost') }) // TODO: enable test when style-loader.js:60 was resolved // test.serial('/extractCSS', async t => { // const window = await nuxt.renderAndGetWindow(url('/extractCSS')) // const html = window.document.head.innerHTML // t.true(html.includes('vendor.css')) // t.true(!html.includes('30px')) // t.is(window.getComputedStyle(window.document.body).getPropertyValue('font-size'), '30px') // }) test('/stateless', async () => { // const spies = await intercept() const window = await nuxt.renderAndGetWindow(url('/stateless')) const html = window.document.body.innerHTML expect(html.includes('