Skip to content

Commit 07330e6

Browse files
committed
test wip
1 parent fff2a52 commit 07330e6

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
(ns adv-src-map.core)
2+
3+
(.log js/console "Hello!" (first [1 2 3]))

src/test/clojure/cljs/build_api_tests.clj

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -840,3 +840,24 @@
840840
(.delete (io/file "package.json"))
841841
(test/delete-node-modules)
842842
(test/delete-out-files out))))
843+
844+
#_(deftest test-advanced-source-maps
845+
(testing "Test that the `sources` of the final merged source map matches the
846+
one in the original Closure Compiler generated advanced source map"
847+
(let [out (.getPath (io/file (test/tmp-dir) "adv-src-map"))]
848+
(test/delete-out-files out)
849+
(test/delete-node-modules)
850+
(let [{:keys [inputs opts]} {:inputs (str (io/file "src" "test" "cljs_build"))
851+
:opts {:main 'cljs-3346-as-alias.core
852+
:output-to (io/file out "main.js")
853+
:source-map (io/file out "main.js.map")
854+
:output-dir out
855+
:optimizations :advanced
856+
:closure-source-map true
857+
:closure-warnings {:check-types :off}}}
858+
cenv (env/default-compiler-env)]
859+
(build/build (build/inputs (io/file inputs "adv_src_map/core.cljs")) opts cenv))
860+
(let [cljs-src-map (slurp (io/file out "adv_src_map/main.js.map"))
861+
closure-src-map (slurp (io/file out "adv_src_map/main.js.map.closure"))]
862+
)
863+
(test/delete-out-files out))))

0 commit comments

Comments
 (0)