2017-12-12 09:42:29 +00:00
|
|
|
import { Nuxt, Builder } from '..'
|
2018-03-16 16:12:06 +00:00
|
|
|
import { loadConfig } from './helpers/config'
|
2017-11-20 07:13:53 +00:00
|
|
|
|
|
|
|
const port = 4010
|
|
|
|
|
|
|
|
let nuxt = null
|
|
|
|
let builder = null
|
2018-03-18 19:31:32 +00:00
|
|
|
// let buildSpies = null
|
2017-11-20 07:13:53 +00:00
|
|
|
|
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 })
|
2017-11-20 07:13:53 +00:00
|
|
|
|
2017-12-17 19:30:26 +00:00
|
|
|
nuxt = new Nuxt(config)
|
2018-03-18 19:31:32 +00:00
|
|
|
builder = new Builder(nuxt)
|
2017-12-17 19:30:26 +00:00
|
|
|
await builder.build()
|
|
|
|
await nuxt.listen(port, 'localhost')
|
2018-03-18 19:31:32 +00:00
|
|
|
}, 30000)
|
2017-11-20 07:13:53 +00:00
|
|
|
|
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)
|
|
|
|
// })
|
2017-11-20 07:13:53 +00:00
|
|
|
|
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()
|
|
|
|
})
|
2017-11-20 07:13:53 +00:00
|
|
|
})
|