refactor: separate multiple folders in path.resolve (#3670)

This commit is contained in:
Clark Du 2018-08-09 23:08:42 +01:00 committed by GitHub
parent 7ced73ebdb
commit b4ab2778cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,7 +21,7 @@ export const Generator = Dist.Generator
const requireModule = esm(module, {})
export const loadFixture = function loadFixture(fixture, overrides) {
const rootDir = path.resolve(__dirname, '../fixtures/' + fixture)
const rootDir = path.resolve(__dirname, '..', 'fixtures', fixture)
const configFile = path.resolve(rootDir, 'nuxt.config.js')
const config = fs.existsSync(configFile) ? requireModule(configFile).default : {}