Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
# Runtime Tests
runtime-windows-test:
name: Runtime Windows Tests
runs-on: windows-2019
runs-on: windows-2022
steps:
- uses: actions/checkout@v2

Expand Down Expand Up @@ -215,7 +215,7 @@ jobs:
# Compiler Windows Tests
compiler-windows-test:
name: Compiler Windows Tests
runs-on: windows-2019
runs-on: windows-2022
steps:
- uses: actions/checkout@v2

Expand Down
2 changes: 1 addition & 1 deletion src/test/cljs_build/trivial/core2.cljs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
(ns trivial.core2)

(. js/console (-lookup 1 2))
(.log js/console (-lookup 1 2))
3 changes: 3 additions & 0 deletions src/test/cljs_build/trivial/core3.cljs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
(ns trivial.core3)

(.log js/console :foo)
3 changes: 3 additions & 0 deletions src/test/cljs_build/trivial/core4.cljs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
(ns trivial.core4)

(.log js/console [])
30 changes: 28 additions & 2 deletions src/test/clojure/cljs/build_api_tests.clj
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@
cenv (env/default-compiler-env)]
(test/delete-out-files out)
(build/build (build/inputs (io/file inputs "trivial/core.cljs")) opts cenv)
(is (< (.length out-file) 10000))))
(is (< (.length out-file) 10240))))

(deftest trivial-output-size-protocol
(let [out (.getPath (io/file (test/tmp-dir) "trivial-output-protocol-test-out"))
Expand All @@ -731,7 +731,33 @@
cenv (env/default-compiler-env)]
(test/delete-out-files out)
(build/build (build/inputs (io/file inputs "trivial/core2.cljs")) opts cenv)
(is (< (.length out-file) 10000))))
(is (< (.length out-file) 10240))))

(deftest trivial-output-size-keyword
(let [out (.getPath (io/file (test/tmp-dir) "trivial-output-keyword-test-out"))
out-file (io/file out "main.js")
{:keys [inputs opts]} {:inputs (str (io/file "src" "test" "cljs_build"))
:opts {:main 'trivial.core3
:output-dir out
:output-to (.getPath out-file)
:optimizations :advanced}}
cenv (env/default-compiler-env)]
(test/delete-out-files out)
(build/build (build/inputs (io/file inputs "trivial/core3.cljs")) opts cenv)
(is (< (.length out-file) 10240))))

(deftest trivial-output-size-vector
(let [out (.getPath (io/file (test/tmp-dir) "trivial-output-vector-test-out"))
out-file (io/file out "main.js")
{:keys [inputs opts]} {:inputs (str (io/file "src" "test" "cljs_build"))
:opts {:main 'trivial.core4
:output-dir out
:output-to (.getPath out-file)
:optimizations :advanced}}
cenv (env/default-compiler-env)]
(test/delete-out-files out)
(build/build (build/inputs (io/file inputs "trivial/core4.cljs")) opts cenv)
(is (< (.length out-file) 32768))))

(deftest cljs-3255-nil-inputs-build
(let [out (.getPath (io/file (test/tmp-dir) "3255-test-out"))
Expand Down