feat(javascript): enable logical assignment (#5489)

This commit is contained in:
Ika authored and GitHub committed 2018-11-18 16:38:35 +08:00
1 parent 85eb8cb0ea
commit 6ee2f464ac
4 files changed
+12 -1

No files matched your search

+2 -1
View File
@@ -33,7 +33,8 @@ function babylonOptions(extraOptions, extraPlugins) {
["pipelineOperator", { proposal: "minimal" }],
"nullishCoalescingOperator",
"bigInt",
"throwExpressions"
"throwExpressions",
"logicalAssignment"
].concat(extraPlugins)
},
extraOptions
@@ -0,0 +1,8 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`logical-assignment.js - babylon-verify 1`] = `
a ||= b;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a ||= b;
`;
@@ -0,0 +1 @@
run_spec(__dirname, ["babylon"]);
@@ -0,0 +1 @@
a ||= b;