diff --git a/test/unit/basic.config.defaults.test.js b/test/unit/basic.config.defaults.test.js index c6d9b85647..5e34e93e29 100644 --- a/test/unit/basic.config.defaults.test.js +++ b/test/unit/basic.config.defaults.test.js @@ -1,4 +1,6 @@ import { resolve } from 'path' +import consola from 'consola' + import { Nuxt, Options, version } from '../utils' describe('basic config defaults', () => { @@ -11,4 +13,16 @@ describe('basic config defaults', () => { const currentNodeModulesDir = resolve(__dirname, '..', '..', 'node_modules') 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() + }) })