2018-03-18 23:41:14 +00:00
|
|
|
import { Nuxt } from '..'
|
|
|
|
import { loadFixture, getPort } from './utils'
|
2017-11-20 07:13:53 +00:00
|
|
|
|
2018-03-18 23:41:14 +00:00
|
|
|
let port
|
2017-11-20 07:13:53 +00:00
|
|
|
|
|
|
|
let nuxt = null
|
2018-03-18 19:31:32 +00:00
|
|
|
// let buildSpies = null
|
2017-11-20 07:13:53 +00:00
|
|
|
|
2018-03-19 02:19:19 +00:00
|
|
|
describe('deprecate', () => {
|
2018-03-18 19:31:32 +00:00
|
|
|
beforeAll(async () => {
|
2018-03-18 23:41:14 +00:00
|
|
|
const config = loadFixture('deprecate')
|
2017-11-20 07:13:53 +00:00
|
|
|
|
2017-12-17 19:30:26 +00:00
|
|
|
nuxt = new Nuxt(config)
|
2018-03-18 23:41:14 +00:00
|
|
|
port = await getPort()
|
2017-12-17 19:30:26 +00:00
|
|
|
await nuxt.listen(port, 'localhost')
|
2018-03-18 23:41:14 +00:00
|
|
|
})
|
2017-11-20 07:13:53 +00:00
|
|
|
|
2018-03-18 23:41:14 +00:00
|
|
|
test.skip('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
|
|
|
})
|