Skip to content

Commit

Permalink
chore: ensure support of nullish operator
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbonnet committed Jan 2, 2021
1 parent 56a1574 commit 325fdb3
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"es6": true
},
"parserOptions": {
"ecmaVersion": 10,
"ecmaVersion": 12,
"sourceType": "module"
},
"globals": {
Expand Down
33 changes: 33 additions & 0 deletions src/tests/fixtures/syntax/operators.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
let a, b, c, d;
a = a || (a = 2);
a ||= 2;
a = a && (a = 2);
a &&= 2;
a = a ?? (a = 2);
a ??= 2;
b = 1 + 2;
b = 1 - 2;
b = 1 / 2;
b = 1 * 2;
c = 2 ** 1;
c = 1 % 2;
d = 1 << 2;
d = 1 >> 2;
d = 1 >>> 2;
d = 1 & 3;
d = 1 ^ 3;
d = 1 | 3;
a == b;
a === b;
a != b;
a !== b;
a > b;
a >= b;
a < b;
a <= b;
++a;
a++;
+a;
-a;
--a;
a--;

0 comments on commit 325fdb3

Please sign in to comment.