2017-11-27 17:00:23 +00:00
|
|
|
import { resolve } from 'path'
|
2018-03-16 19:52:17 +00:00
|
|
|
|
2017-12-12 09:42:29 +00:00
|
|
|
import { Nuxt, Options } from '..'
|
2017-11-30 10:24:06 +00:00
|
|
|
import { version } from '../package.json'
|
|
|
|
|
2018-03-18 19:31:32 +00:00
|
|
|
describe('basic config defaults', () => {
|
|
|
|
test('Nuxt.version is same as package', () => {
|
|
|
|
expect(Nuxt.version).toBe(version)
|
|
|
|
})
|
2017-11-27 17:00:23 +00:00
|
|
|
|
2018-03-18 19:31:32 +00:00
|
|
|
test('modulesDir uses /node_modules as default if not set', async () => {
|
|
|
|
const options = Options.from({})
|
|
|
|
const currentNodeModulesDir = resolve(__dirname, '..', 'node_modules')
|
|
|
|
expect(options.modulesDir.includes(currentNodeModulesDir)).toBe(true)
|
|
|
|
})
|
2017-11-27 17:00:23 +00:00
|
|
|
})
|