]> code.delx.au - gnu-emacs-elpa/blobdiff - tests/parser.el
js2-define-symbol: Treat const same as let
[gnu-emacs-elpa] / tests / parser.el
index 9667e566067986b9484abd1dda5480ec919f5f71..69222b89b1cad1ff3b95cfff4c243925d3e4ea17 100644 (file)
@@ -968,22 +968,12 @@ the test."
   (js2-mode--and-parse)
   (js2-test-scope-of-nth-variable-satisifies-predicate "i" 0 #'js2-for-node-p))
 
-(js2-deftest const-scope-sloppy-script "{const a;} a;"
-  (js2-mode--and-parse)
-  (js2-test-scope-of-nth-variable-satisifies-predicate "a" 0 #'js2-script-node-p)
-  (js2-test-scope-of-nth-variable-satisifies-predicate "a" 1 #'js2-script-node-p))
-
-(js2-deftest const-scope-strict-script "'use strict'; { const a; } a;"
+(js2-deftest const-scope-inside-script "{ const a; } a;"
   (js2-mode--and-parse)
   (js2-test-scope-of-nth-variable-satisifies-predicate "a" 0 #'js2-block-node-p)
   (js2-test-scope-of-nth-variable-satisifies-predicate "a" 1 #'null))
 
-(js2-deftest const-scope-sloppy-function "function f() { { const a; } a; }"
-  (js2-mode--and-parse)
-  (js2-test-scope-of-nth-variable-satisifies-predicate "a" 0 #'js2-function-node-p)
-  (js2-test-scope-of-nth-variable-satisifies-predicate "a" 1 #'js2-function-node-p))
-
-(js2-deftest const-scope-strict-function "function f() { 'use strict'; { const a; } a; }"
+(js2-deftest const-scope-inside-function "function f() { { const a; } a; }"
   (js2-mode--and-parse)
   (js2-test-scope-of-nth-variable-satisifies-predicate "a" 0 #'js2-block-node-p)
   (js2-test-scope-of-nth-variable-satisifies-predicate "a" 1 #'null))