Nuxt/test/helpers/config.js

12 lines
327 B
JavaScript
Raw Normal View History

2018-03-16 16:12:06 +00:00
import { resolve } from 'path'
import { requireModule } from '../../lib/common/module'
export function loadConfig(fixture, overrides) {
const rootDir = resolve(__dirname, '../fixtures/' + fixture)
const config = requireModule(resolve(rootDir, 'nuxt.config.js'))
return Object.assign({ rootDir }, config, overrides)
}