Nuxt/test/deprecate.test.js

32 lines
816 B
JavaScript
Raw Normal View History

import { Nuxt, Builder } from '..'
2018-03-16 16:12:06 +00:00
import { loadConfig } from './helpers/config'
const port = 4010
let nuxt = null
let builder = null
2018-03-18 19:31:32 +00:00
// let buildSpies = null
2018-03-18 19:31:32 +00:00
describe('depricate', () => {
// Init nuxt.js and create server listening on localhost:4000
beforeAll(async () => {
const config = loadConfig('deprecate', { dev: false })
nuxt = new Nuxt(config)
2018-03-18 19:31:32 +00:00
builder = new Builder(nuxt)
await builder.build()
await nuxt.listen(port, 'localhost')
2018-03-18 19:31:32 +00:00
}, 30000)
2018-03-18 19:31:32 +00:00
// test('Deprecated: module.addVendor()', async () => {
// expect(
// buildSpies.warn.calledWithMatch('module: addVendor is no longer necessary')
// ).toBe(true)
// })
2018-03-18 19:31:32 +00:00
// Close server and ask nuxt to stop listening to file changes
test('Closing server and nuxt.js', async () => {
await nuxt.close()
})
})