Fork me on GitHub
#re-frame
<
2022-12-25
>
DrLjótsson23:12:55

I am using the re-frame-test library to run tests in my re-frame app and getting a lot of "Subscribe was called outside of a reactive context." warnings inside of run-test-sync and run-test-async. Can this be fixed? The same question has been asked before but without a solution (?) https://clojurians-log.clojureverse.org/re-frame/2022-09-15

DrLjótsson00:12:54

(set! re-frame.interop/debug-enabled? false)seems to do the trick, but that maybe hides debug messages that are actually important

DrLjótsson22:12:14

If run-test-sync and run-test-async tests are actually run in an incorrect way, I guess that they are prone to memory leaks because of cached subs? I have observed that after repeated runs my tests in a browser, I get a browser error - could that have been caused by memory leaks? Would it fix the problem to run (re-frame.subs/clear-subscription-cache!) after each test?