mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 16:12:12 +00:00
test: deprecate build.vendor
This commit is contained in:
parent
708f602a62
commit
21334c21e0
@ -1,4 +1,6 @@
|
|||||||
import { resolve } from 'path'
|
import { resolve } from 'path'
|
||||||
|
import consola from 'consola'
|
||||||
|
|
||||||
import { Nuxt, Options, version } from '../utils'
|
import { Nuxt, Options, version } from '../utils'
|
||||||
|
|
||||||
describe('basic config defaults', () => {
|
describe('basic config defaults', () => {
|
||||||
@ -11,4 +13,16 @@ describe('basic config defaults', () => {
|
|||||||
const currentNodeModulesDir = resolve(__dirname, '..', '..', 'node_modules')
|
const currentNodeModulesDir = resolve(__dirname, '..', '..', 'node_modules')
|
||||||
expect(options.modulesDir.includes(currentNodeModulesDir)).toBe(true)
|
expect(options.modulesDir.includes(currentNodeModulesDir)).toBe(true)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
test('vendor has been deprecated', async () => {
|
||||||
|
jest.spyOn(consola, 'warn')
|
||||||
|
|
||||||
|
const options = Options.from({
|
||||||
|
build: { vendor: 'vue' }
|
||||||
|
})
|
||||||
|
expect(options.build.vendor).toBeUndefined()
|
||||||
|
expect(consola.warn).toHaveBeenCalledWith('vendor has been deprecated due to webpack4 optimization')
|
||||||
|
|
||||||
|
consola.warn.mockRestore()
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user