Fork me on GitHub
#clojurescript
<
2023-12-07
>
Abhinav03:12:20

Hi, I'm using karma as a test runner, and in the test logs I see some Error logs like

ERROR: 'Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in %s.%s', 'a useEffect cleanup function', '
and
ERROR: 're-frame: no', ':event', 'handler registered for:', {ns: 'filter-events', name: 're-filter-collection', fqn: 'filter-events/re-filter-collection', _hash: -999241368, cljs$lang$protocol_mask$partition0$: 2153775105, cljs$lang$protocol_mask$partition1$: 4096}
is it possible to fail the karma test if such errors occur? Currently the tests are successful.

itaied08:12:12

Hey all, how do I set a value to process.exitCode ? I'm trying to write the following:

if (missingIds()) {process.exitCode=1}
(when (missing-ids?) <cljs-code>)

Sam Ferrell08:12:10

(set! (.-exitCode process) 1)

itaied08:12:04

oh perfect! thanks