Skip to content

Commit 6fa1af0

Browse files
committed
add code size ratchet for PHM
1 parent ad83b3e commit 6fa1af0

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
(ns trivial.core5)
2+
3+
(.log js/console {})

src/test/clojure/cljs/build_api_tests.clj

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -759,6 +759,19 @@
759759
(build/build (build/inputs (io/file inputs "trivial/core4.cljs")) opts cenv)
760760
(is (< (.length out-file) 32768))))
761761

762+
(deftest trivial-output-size-map
763+
(let [out (.getPath (io/file (test/tmp-dir) "trivial-output-map-test-out"))
764+
out-file (io/file out "main.js")
765+
{:keys [inputs opts]} {:inputs (str (io/file "src" "test" "cljs_build"))
766+
:opts {:main 'trivial.core5
767+
:output-dir out
768+
:output-to (.getPath out-file)
769+
:optimizations :advanced}}
770+
cenv (env/default-compiler-env)]
771+
(test/delete-out-files out)
772+
(build/build (build/inputs (io/file inputs "trivial/core5.cljs")) opts cenv)
773+
(is (< (.length out-file) 92160))))
774+
762775
(deftest cljs-3255-nil-inputs-build
763776
(let [out (.getPath (io/file (test/tmp-dir) "3255-test-out"))
764777
out-file (io/file out "main.js")

0 commit comments

Comments
 (0)