 (require 'cl)
 (require 's)
-
-(defun _any (pred seq)
-  (< 0 (count-if pred seq)))
-
-(defun _partial (f &rest args)
-  (apply 'apply-partially (cons f args)))
+(require 'bang)
 
 (defvar js2r-path-to-tests "/test/"
   "Path to tests from a root shared with sources")

        '("Test.js" "_test.js" "-test.js")))

(defun looks-like-test-file-name (file-name)
  (_any (_partial 's-ends-with-p file-name)
        (possible-test-file-suffixes)))

(defun jump-to-source-file-other-window (arg)
  (interactive "P")

    (if (file-exists-p file) file nil)))

(defun test-file-name (suffix)
  (format "%s/%s%s.js" (s-chop-suffix "/" (guess-test-folder)) (test-file-name-stub) suffix))

(defun test-file-name-stub ()
  (s-chop-suffix ".js" (file-name-nondirectory (buffer-file-name))))

(defun guess-test-folder ()
  (let ((source-dir (file-name-directory (buffer-file-name))))
