File tree Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Original file line number Diff line number Diff line change 1919 "serve-handler" : " ~6.1.2" ,
2020 "shadow-cljs" : " ~2.8.71" ,
2121 "taiko" : " ~1.0.2" ,
22+ "taiko-diagnostics" : " ~0.4.0" ,
2223 "zprint-clj" : " ^0.5.0"
2324 },
2425 "dependencies" : {
Original file line number Diff line number Diff line change 33 [cljs.test :refer-macros [deftest is async use-fixtures]]
44 [" http" :as http]
55 [" serve-handler" :as serve-handler]
6- [" taiko" :refer [openBrowser goto closeBrowser text]]))
6+ [" taiko" :refer [openBrowser goto closeBrowser text diagnostics ]]))
77
88; Serve public/ on a static server.
99(use-fixtures
2121 (async
2222 done
2323 (->
24- (openBrowser browser-opts)
25- (.then #(goto " http://localhost:5000" ))
26- (.then #(.exists (text test-string)))
27- (.then #(is % (str " Text '" test-string " ' should exist in page" )))
28- (.catch #(is false " Should not have thrown errors" ))
29- (.finally #(closeBrowser ))
30- (.then #(done ))))))
24+ (openBrowser browser-opts)
25+ (.then #(.logConsoleInfo diagnostics))
26+ (.then #(.on %1 " logEntry" (fn [log] (is (not (= (.-level log) " error" ))
27+ (str " Should not log errors: "
28+ (js/JSON.stringify log))))))
29+ (.then #(goto " http://localhost:5000" ))
30+ (.then #(.exists (text test-string)))
31+ (.then #(is % (str " Text '" test-string " ' should exist in page" )))
32+ (.catch #(is false " Should not have thrown errors" ))
33+ (.finally #(closeBrowser ))
34+ (.then #(done ))))))
You can’t perform that action at this time.
0 commit comments