fix(test): fallback to config if no config.default

This commit is contained in:
pooya parsa 2019-01-20 22:14:55 +03:30
parent 5b66afc23a
commit 2f2ec7ac30

View File

@ -19,7 +19,8 @@ export const loadFixture = async function (fixture, overrides) {
for (const ext of ['ts', 'js']) {
const configFile = path.resolve(rootDir, `nuxt.config.${ext}`)
if (fs.existsSync(configFile)) {
config = (await import(`../fixtures/${fixture}/nuxt.config`)).default
config = await import(`../fixtures/${fixture}/nuxt.config`)
config = config.default || config
break
}
}