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

15 lines
464 B
JavaScript
Raw Normal View History

import test from 'ava'
import { resolve } from 'path'
2017-11-30 10:24:06 +00:00
import { Nuxt, Options } from '../index'
import { version } from '../package.json'
test('Nuxt.version is same as package', t => {
t.is(Nuxt.version, version)
})
test('modulesDir uses /node_modules as default if not set', async t => {
const options = Options.from({})
const currentNodeModulesDir = resolve(__dirname, '..', 'node_modules')
t.true(options.modulesDir.includes(currentNodeModulesDir))
})