Skip to content

Commit

Permalink
cleanup parseAndAssertSame interface
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Sep 13, 2022
1 parent b079af2 commit d08aeed
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions eslint/babel-eslint-parser/test/index.js
Expand Up @@ -72,14 +72,7 @@ describe("Babel and Espree", () => {
sourceType: "module",
};

function parseAndAssertSame(
code,
eslintVersion = undefined,
babelEcmaFeatures = null,
) {
if (eslintVersion !== undefined) {
throw new Error("eslintVersion is not undefined");
}
function parseAndAssertSame(code, babelEcmaFeatures = null) {
code = unpad(code);

if (isESLint7) {
Expand Down Expand Up @@ -888,7 +881,7 @@ describe("Babel and Espree", () => {

if (process.env.BABEL_8_BREAKING) {
it("return outside function with ecmaFeatures.globalReturn: true", () => {
parseAndAssertSame("return;", /* version */ undefined, {
parseAndAssertSame("return;", {
globalReturn: true,
});
});
Expand Down

0 comments on commit d08aeed

Please sign in to comment.