]> code.delx.au - gnu-emacs-elpa/blobdiff - tests/parser.el
js2-parse-plain-property: Disallow numbers as abbreviated props
[gnu-emacs-elpa] / tests / parser.el
index d986ffc34c9651a25d6ba54d1cff8a3cab5072c9..ade10d80d92881e821df215a4ff4b25c4f8ba9fc 100644 (file)
@@ -184,6 +184,9 @@ the test."
 (js2-deftest-parse object-literal-shorthand
   "var x = {a: 1, b, c: 1, d};")
 
+(js2-deftest-parse object-literal-shorthard-with-number
+  "var a = {1};" :syntax-error ";" :errors-count 2)
+
 (js2-deftest-parse object-literal-method
   "var x = {f(y) {  return y;\n}};")