Skip to content

Commit 28f5133

Browse files
committed
- lite testing wip
1 parent 67ee02b commit 28f5133

File tree

4 files changed

+25
-13
lines changed

4 files changed

+25
-13
lines changed

deps.edn

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
"-e" "(cljs.test-runner/-main)"]}
2020
:runtime.test.build {:extra-paths ["src/test/cljs"]
2121
:main-opts ["-m" "cljs.main" "-co" "resources/test.edn" "-c"]}
22+
:lite.test.build {:extra-paths ["src/test/cljs"]
23+
:main-opts ["-m" "cljs.main" "-co" "resources/lite_test.edn" "-c"]}
2224
:selfhost.test.build {:extra-paths ["src/test/self"]
2325
:main-opts ["-m" "cljs.main" "-co" "resources/self_host_test.edn" "-c"]}
2426
:selfparity.test.build {:extra-paths ["src/test/self"]

resources/lite_test.edn

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
{:optimizations :advanced
2-
:main lite-test-runner
3-
:output-to "builds/out-lite/lite-test.js"
4-
:output-dir "builds/out-lite"
5-
:output-wrapper true
6-
:verbose true
7-
:compiler-stats true
8-
:parallel-build true
1+
{:optimizations :advanced
2+
:main lite-test-runner
3+
:lite-mode true
4+
:output-to "builds/out-lite/lite-test.js"
5+
:output-dir "builds/out-lite"
6+
:output-wrapper true
7+
:verbose true
8+
:compiler-stats true
9+
:parallel-build true
910
:closure-warnings {:non-standard-jsdoc :off :global-this :off}
10-
:language-out :es5}
11+
:language-out :es5
12+
:pseudo-names true
13+
:pretty-print true}

src/test/cljs/cljs/lite_collections_test.cljs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,11 @@
77
; You must not remove this notice, or any other, from this software.
88

99
(ns cljs.lite-collections-test
10-
(:require [cljs.test :refer-macros [deftest testing is are run-tests]]
11-
[clojure.test.check.clojure-test :refer-macros [defspec]]))
10+
(:require [cljs.test :refer-macros [deftest testing is are run-tests]]))
11+
12+
;; NOTE: ** this name space must be tested with :lite-mode true **
13+
14+
(deftest test-obj-map
15+
(let [a (. ObjMap -EMPTY)
16+
b {}]
17+
(is (identical? a b))))

src/test/cljs/lite_test_runner.cljs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
;; You must not remove this notice, or any other, from this software.
88

99
(ns lite-test-runner
10-
(:require [cljs.lite-collections-test]))
10+
(:require [cljs.test :refer-macros [run-tests]]
11+
[cljs.lite-collections-test]))
1112

1213
(set! *print-newline* false)
1314

@@ -17,5 +18,5 @@
1718
(enable-console-print!))
1819

1920
(run-tests
20-
'cljs.collections-test
21+
'cljs.lite-collections-test
2122
)

0 commit comments

Comments
 (0)