]> code.delx.au - gnu-emacs-elpa/blobdiff - tests/externs.el
Allow space before global declaration
[gnu-emacs-elpa] / tests / externs.el
index 40957f600cf85fa3636fb23573562c0a36b9d274..09a60a9d3f9e89cc817696fecae9415316871c45 100644 (file)
     (should (equal (js2-get-jslint-globals)
                    '("quux" "tee" "$")))))
 
+(ert-deftest js2-finds-jslint-globals-with-space ()
+  (with-temp-buffer
+    (insert "/* global foo, bar:false, baz:true")
+    (js2-mode)
+    (should (equal (js2-get-jslint-globals)
+                   '("foo" "bar" "baz")))))
+
 ;;;TODO
 ;; ensure that any symbols bound with the import syntax are added to the extern list
 ;; ensure that any symbols bound with the export syntax exist in the file scope