Open sbitproz opened 1 year ago
@sbitproz it seems to me that your question may be more about testing observation chains than about testing signals per se. Regardless, this article https://weareadaptive.com/2024/01/09/unit-testing-rxjs-observables-a-practical-guide/ provides guidance on how to test code like that in the example here.
Overview
I'm trying to test a signal which is exported from a JS module. The problem is that between tests it's changed and the tests become interdependent.
Recreation
Which has the following binding
Because the signal is exported from this module it's akin to a global variable and the value is changed between tests within the test runner. This makes the values less predictable and the tests more flaky and interdependent.
Is my analysis correct?
What's the best approach to testing signals?
Are there any examples on the
https://react-rxjs.org/
?