Collect browser errors while a test runs, e.g. to fail a smoke test when a page throws or logs an error.
(let [errors (console/watch-errors!)] ... drive the UI ... (is (empty? (console/page-errors errors))))
Collect browser errors while a test runs, e.g. to fail a smoke test when
a page throws or logs an error.
(let [errors (console/watch-errors!)]
... drive the UI ...
(is (empty? (console/page-errors errors))))(console-errors handle)console.error messages that were not ignored.
console.error messages that were not ignored.
React/MUI development warnings that are logged as console errors but do not indicate a broken page.
React/MUI development warnings that are logged as console errors but do not indicate a broken page.
(page-errors handle)Uncaught exceptions thrown by the page.
Uncaught exceptions thrown by the page.
(watch-errors!)(watch-errors! ignored)Start recording errors on the bound page. Returns a handle for
page-errors / console-errors. ignored is a list of substrings;
console errors containing any of them are dropped.
Start recording errors on the bound page. Returns a handle for `page-errors` / `console-errors`. `ignored` is a list of substrings; console errors containing any of them are dropped.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |