     (if (file-exists-p file) file nil)))
 
 (defun test-file-name (suffix)
-  (format "%s/%s%s.js" (js2r-chop-suffix (guess-test-folder) "/") (test-file-name-stub) suffix))
+  (format "%s/%s%s.js" (s-chop-suffix "/" (guess-test-folder)) (test-file-name-stub) suffix))
 
 (defun test-file-name-stub ()
-  (js2r-chop-suffix (file-name-nondirectory (buffer-file-name)) ".js"))
+  (s-chop-suffix ".js" (file-name-nondirectory (buffer-file-name))))
 
 (defun guess-test-folder ()
   (let ((source-dir (file-name-directory (buffer-file-name))))

(require 'cl)
(require 's)

(defun _any (pred seq)
  (< 0 (count-if pred seq)))

(defun _partial (f &rest args)
  (apply 'apply-partially (cons f args)))

(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? (s-ends-with-p it file-name) (possible-test-file-suffixes)))

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