Nuxt/test/basic.config.defaults.test.js
2018-03-19 03:11:14 +03:30

16 lines
516 B
JavaScript

import { resolve } from 'path'
import { Nuxt, Options } from '..'
import { version } from '../package.json'
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)
})
})