Permalink
Browse files

CLJS-2915: Tests fail if directory has a period (.) in the path

We replace the periods with hyphens. We then leverage the cond-> to selectively transform to underscores.

I coded this specific `replace` as char / char - which is different from the string / srting pattern used in the rest of the pipeline - as it feels simpler than the equivalent regex.
  • Loading branch information...
raymcdermott authored and swannodette committed Sep 25, 2018
1 parent cad53c6 commit 6eedd0a08c49f7b0d4dcb30977b2fb38c90577bd
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/test/clojure/cljs/module_processing_tests.clj
@@ -36,6 +36,7 @@
(.getAbsolutePath $)
(subs $ 0 (.lastIndexOf $ (str File/separator)))
(string/replace $ "/" "$")
(string/replace $ \. \-)
(cond-> $ code? (string/replace "-" "_"))
;; Windows
(string/replace $ "\\" "$")

0 comments on commit 6eedd0a

Please sign in to comment.