limo.test
Limo features useful under a testing context
read-performance-logs-until-test-pass!
macro
(read-performance-logs-until-test-pass! [logs-atom] & body)(read-performance-logs-until-test-pass! [logs-atom {:keys [timeout interval driver log-type pred]}] & body)Repeatedly fetches performance logs until the body returns no test failures or unless a timeout occurs.
NOTE: this destructively consumes performance logs messages from the browser.
Example:
(read-performance-logs-until-test-pass! [logs]
(is (first (filter #{"Network.requestWillBeSent" :method :message :message} logs))
"FAIL: a network request was not sent!"))
test-failures?
(test-failures? test-fn)