Skip to content

Commit

Permalink
Do not load root babel.config.js in esilnt tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo authored and JLHwung committed Dec 9, 2019
1 parent 0164662 commit c401743
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 2 additions & 0 deletions eslint/babel-eslint-parser/test/integration.js
Expand Up @@ -16,6 +16,8 @@ const baseEslintOpts = {
parser: "current-babel-eslint",
parserOptions: {
sourceType: "script",
requireConfigFile: false,
babelOptions: { configFile: false }
},
};

Expand Down
9 changes: 3 additions & 6 deletions eslint/babel-eslint-parser/test/non-regression.js
Expand Up @@ -18,26 +18,23 @@ function verifyAndAssertMessagesWithSpecificESLint(
node: true,
es6: true,
},
...overrideConfig,
parserOptions: {
sourceType,
ecmaFeatures: {
globalReturn: true,
},
requireConfigFile: false,
babelOptions: {
configFile: path.resolve(
__dirname,
"./fixtures/config/babel.config.js",
),
},
...overrideConfig?.parserOptions
},
};

if (overrideConfig) {
for (const key in overrideConfig) {
config[key] = overrideConfig[key];
}
}

const messages = linter.verify(code, config);

if (messages.length !== expectedMessages.length) {
Expand Down

0 comments on commit c401743

Please sign in to comment.