Nuxt/test/unit/basic.config.defaults.test.js
Clark Du ef7a42649d misc: improve coverage and packaging (#3121)
nuxt-start and nuxt/legacy are also coming!
2018-03-28 02:58:17 +04:30

15 lines
495 B
JavaScript

import { resolve } from 'path'
import { Nuxt, Options, version } from '../utils'
describe('basic config defaults', () => {
test('Nuxt.version is same as package', () => {
expect(Nuxt.version).toBe(version)
})
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)
})
})