Nuxt/test/unit/basic.config.defaults.test.js

16 lines
529 B
JavaScript
Raw Normal View History

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