when (and (eq 'block (js2-comment-node-format node))
(save-excursion
(goto-char (js2-node-abs-pos node))
- (looking-at "/\\*global ")))
+ (looking-at "/\\* *global ")))
append (js2-get-jslint-globals-in
(match-end 0)
(js2-node-abs-end node))))
(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