]> code.delx.au - gnu-emacs-elpa/blobdiff - tests/parser.el
Handle arrowfun empty-args in js2-parse-paren-expr-or-generator-comp
[gnu-emacs-elpa] / tests / parser.el
index 7b9b8b942e21099580c5861a367e3b6bd5cf2d99..553200e887f9cfd8ef309b1b347fa39ae8de5488 100644 (file)
@@ -260,6 +260,9 @@ the test."
 (js2-deftest-parse parenless-arrow-function-prohibits-destructuring
   "[a, b] => {a + b;};" :syntax-error "=>" :errors-count 4)
 
+(js2-deftest-parse arrow-function-recovers-from-error
+  "[(,foo) => 1];" :syntax-error "=>" :errors-count 6)
+
 ;;; Automatic semicolon insertion
 
 (js2-deftest-parse no-auto-semi-insertion-after-if