]> code.delx.au - gnu-emacs-elpa/blobdiff - tests/externs.el
Allow space before global declaration
[gnu-emacs-elpa] / tests / externs.el
index 8fb1161138e4ff7e1f64ea832cafdf9e8f055e19..09a60a9d3f9e89cc817696fecae9415316871c45 100644 (file)
     (js2-mode)
     (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