Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Load
.browserslistrc
when using old @babel/core
versions
- Loading branch information
1 parent
265424d
commit bed912f
Showing
5 changed files
with
65 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import * as babel7_12 from "@babel/core"; | ||
import env from ".."; | ||
import path from "path"; | ||
|
||
describe("#12880", () => { | ||
it("read the .browserslistrc file when using @babel/core < 7.13.0", () => { | ||
// The browserslistrc file contains "firefox 50". | ||
// a ** b is supported starting from firefox 52; | ||
// a => b is supported starting from firefox 45. | ||
const out = babel7_12.transformSync("a ** b; a => b;", { | ||
configFile: false, | ||
presets: [[env, { modules: false }]], | ||
filename: path.join(__dirname, "regressions", "input.js"), | ||
}); | ||
|
||
expect(out.code).toMatchInlineSnapshot(` | ||
"Math.pow(a, b); | ||
a => b;" | ||
`); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
firefox 50 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters