[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/js2-mode c1763ab 52/61: add failing tests
From: |
Dmitry Gutov |
Subject: |
[elpa] externals/js2-mode c1763ab 52/61: add failing tests |
Date: |
Sun, 20 Dec 2020 12:20:11 -0500 (EST) |
branch: externals/js2-mode
commit c1763ab0a3f50f523165cc2436d1d0cf66d61774
Author: babenhauserheide <arne.babenhauserheide@disy.net>
Commit: babenhauserheide <arne.babenhauserheide@disy.net>
add failing tests
---
tests/parser.el | 31 ++++++++++++++++---------------
1 file changed, 16 insertions(+), 15 deletions(-)
diff --git a/tests/parser.el b/tests/parser.el
index 094ca29..4fa1950 100644
--- a/tests/parser.el
+++ b/tests/parser.el
@@ -995,6 +995,22 @@ the test."
(js2-deftest-parse exponentiation-prohibits-unary-op
"var a = -b ** c" :syntax-error "-b")
+;; nullish coalescing, via https://github.com/tc39/proposal-nullish-coalescing
+(js2-deftest-parse nullish-coalescing-operator-null-variable
+ "var a = null; a ?? 1;")
+
+(js2-deftest-parse nullish-coalescing-operator-inexisting-field
+ "var a = {}; a.nonexistant ?? 1;")
+
+(js2-deftest-parse nullish-coalescing-operator-null-value
+ "var b = 1; null ?? b;")
+
+(js2-deftest-parse nullish-coalescing-operator-in-if
+ "if (null ?? b) {
+ return null;
+}")
+
+
(js2-deftest optional-chaining-operator-on-property-access
"var a = {}; a?.b;"
(js2-mode--and-parse)
@@ -1016,21 +1032,6 @@ the test."
(should node)
(should (string= (js2-node-text node) "99"))))
-;; nullish coalescing, via https://github.com/tc39/proposal-nullish-coalescing
-(js2-deftest nullish-coalescing-operator-null-variable
- "var a = null; a ?? b;"
- (js2-mode--and-parse)
- (let ((node (js2-find-node js2-mode-ast 'js2-name-node-p)))
- (should node)
- (should (string= (js2-node-text node) "b"))))
-
-(js2-deftest nullish-coalescing-operator-null-value
- "null ?? b;"
- (js2-mode--and-parse)
- (let ((node (js2-find-node js2-mode-ast 'js2-name-node-p)))
- (should node)
- (should (string= (js2-node-text node) "b"))))
-
(js2-deftest unary-void-node-start
"var c = void 0"
(js2-mode--and-parse)
- [elpa] externals/js2-mode ae2d021 40/61: Merge pull request #554 from phst/unused-var, (continued)
- [elpa] externals/js2-mode ae2d021 40/61: Merge pull request #554 from phst/unused-var, Dmitry Gutov, 2020/12/20
- [elpa] externals/js2-mode 3afdc05 42/61: move HTML element constructors to specific section, Dmitry Gutov, 2020/12/20
- [elpa] externals/js2-mode df9d74e 46/61: Improve a comment, Dmitry Gutov, 2020/12/20
- [elpa] externals/js2-mode b4ede70 47/61: Fix &rest syntax in cl-destructuring-bind., Dmitry Gutov, 2020/12/20
- [elpa] externals/js2-mode db17df4 53/61: Fix nullish coalescing in cond exprs and add test with ternary op, Dmitry Gutov, 2020/12/20
- [elpa] externals/js2-mode c665ebe 55/61: Move '??' back between '?:' and '||', Dmitry Gutov, 2020/12/20
- [elpa] externals/js2-mode 7f4ada4 49/61: start implementing NULLISH-COALESCING, likely incomplete, Dmitry Gutov, 2020/12/20
- [elpa] externals/js2-mode ffb7099 58/61: Merge pull request #563 from KevinBoyette/update-readme, Dmitry Gutov, 2020/12/20
- [elpa] externals/js2-mode 90e1434 48/61: Merge pull request #558 from phst/edebug, Dmitry Gutov, 2020/12/20
- [elpa] externals/js2-mode eb3be7e 54/61: Fix misplaced paren, Dmitry Gutov, 2020/12/20
- [elpa] externals/js2-mode c1763ab 52/61: add failing tests,
Dmitry Gutov <=
- [elpa] externals/js2-mode 0f627a4 57/61: Update README.md, Dmitry Gutov, 2020/12/20
- [elpa] externals/js2-mode 6740d34 50/61: fix tokencount + structure, Dmitry Gutov, 2020/12/20
- [elpa] externals/js2-mode f956476 60/61: Release new version, Dmitry Gutov, 2020/12/20
- [elpa] externals/js2-mode f7816bd 59/61: Support logical assignment operators, Dmitry Gutov, 2020/12/20
- [elpa] externals/js2-mode 40aab27 56/61: Update NEWS, Dmitry Gutov, 2020/12/20
- [elpa] externals/js2-mode b21e117 36/61: Add WindowOrWorkerGlobalScope symbols to js2-browser-externs, Dmitry Gutov, 2020/12/20
- [elpa] externals/js2-mode 394b85e 51/61: Add node creation and basic syntax tests, Dmitry Gutov, 2020/12/20
- [elpa] externals/js2-mode 29979e5 61/61: Merge branch 'externals/js2-mode' of git+ssh://git.sv.gnu.org/srv/git/emacs/elpa, Dmitry Gutov, 2020/12/20