Skip to content

Commit

Permalink
Run tests headless in CI. #30
Browse files Browse the repository at this point in the history
  • Loading branch information
chr15m committed Feb 2, 2024
1 parent 35d8fdb commit ee1e779
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src-tests/e2etests.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
[applied-science.js-interop :as j]
[promesa.core :as p]
["child_process" :refer [spawn spawnSync]]
["process" :refer [env]]
["tree-kill$default" :as kill]
["playwright$default" :as pw]
["wait-port$default" :as wait-for-port]
Expand Down Expand Up @@ -50,7 +51,7 @@
(swap! log-listeners conj [re-string res]))))

(defn get-browser []
(p/let [browser (.launch pw/chromium #js {:headless false :timeout 3000})
(p/let [browser (.launch pw/chromium #js {:headless (nil? (j/get env "CI")) :timeout 3000})
context (.newContext browser)
page (.newPage context)]
(.setDefaultTimeout page 3000)
Expand Down

0 comments on commit ee1e779

Please sign in to comment.