Skip to content

Commit 0256642

Browse files
committedJan 22, 2025·
Add bb tasks for Cljs tests
1 parent b1d0662 commit 0256642

File tree

2 files changed

+26
-10
lines changed

2 files changed

+26
-10
lines changed
 

‎Justfile

-10
This file was deleted.

‎bb.edn

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{:tasks
2+
{init-lint {:task (shell "sh -c" "clj-kondo --copy-configs --lint $(lein classpath)")}
3+
lint {:doc "Run clj-kondo"
4+
:task (shell "./lint.sh")}
5+
6+
watch-node-test {:doc "Watch files for changes and run Cljs tests on Node.js"
7+
:task (shell "npx shadow-cljs watch node-test")}
8+
node-test {:doc "Compile and run Cljs tests"
9+
:task (shell "npx shadow-cljs compile node-test")}
10+
11+
watch-browser-test-local {:doc "Start watching Cljs tests for changes and start HTTP server for running tests in a local browser"
12+
:task (shell "npx shadow-cljs watch browser-test")}
13+
14+
;; Karma watch needs to file to exist before start
15+
-karma-placeholder (shell "sh -c" "mkdir -p target/karma && touch target/karma/ci.js")
16+
-watch-karma-cljs {:depends [-karma-placeholder]
17+
:task (shell "npx shadow-cljs watch karma")}
18+
-watch-karma-test (shell "npx karma start")
19+
-watch-karma {:depends [-watch-karma-cljs -watch-karma-test]}
20+
watch-karma {:doc "Watch Cljs tests for changes, compile for Karma and run Karma tests on changes"
21+
:task (run '-watch-karma {:parallel true})}
22+
23+
test-karma {:doc "Compile Cljs tests and run using Karma once"
24+
:task (do
25+
(shell "npx shadow-cljs compile karma")
26+
(shell "npx karma start --single-run"))}}}

0 commit comments

Comments
 (0)
Please sign in to comment.