diff --git a/eslint/babel-eslint-parser/test/worker/configuration.skip-bundled.js b/eslint/babel-eslint-parser/test/worker/configuration.skip-bundled.js index 9699f125e726..c62736950e01 100644 --- a/eslint/babel-eslint-parser/test/worker/configuration.skip-bundled.js +++ b/eslint/babel-eslint-parser/test/worker/configuration.skip-bundled.js @@ -19,25 +19,50 @@ describe("normalizeParserOptions", () => { expect(result).toHaveProperty("configFile", undefined); }); }); - it("default parserOpts", () => { - const result = normalizeParserOptions({ requireConfigFile: false }); - expect(result.parserOpts).toMatchInlineSnapshot(` - Object { - "allowImportExportEverywhere": false, - "allowReturnOutsideFunction": true, - "allowSuperOutsideMethod": true, - "attachComment": false, - "plugins": Array [ - Array [ - "estree", - Object { - "classFeatures": false, - }, + (process.env.BABEL_8_BREAKING ? it.skip : it)( + "Babel 7 default parserOpts", + () => { + const result = normalizeParserOptions({ requireConfigFile: false }); + expect(result.parserOpts).toMatchInlineSnapshot(` + Object { + "allowImportExportEverywhere": false, + "allowReturnOutsideFunction": true, + "allowSuperOutsideMethod": true, + "attachComment": false, + "plugins": Array [ + Array [ + "estree", + Object { + "classFeatures": false, + }, + ], + ], + "ranges": true, + "tokens": true, + } + `); + }, + ); + (process.env.BABEL_8_BREAKING ? it : it.skip)( + "Babel 8 default parserOpts", + () => { + const result = normalizeParserOptions({ requireConfigFile: false }); + expect(result.parserOpts).toMatchInlineSnapshot(` + Object { + "allowReturnOutsideFunction": false, + "attachComment": false, + "plugins": Array [ + Array [ + "estree", + Object { + "classFeatures": false, + }, + ], ], - ], - "ranges": true, - "tokens": true, - } - `); - }); + "ranges": true, + "tokens": true, + } + `); + }, + ); });