Skip to content

re: Testing Svelte stores and mocking dependencies VIEW POST

re: Me again :) What is the purpose of removing the stubbing and adding rewire$fetch? There is now no way to mock the return value of fetch which I t...

I'm wondering if it's because you split the testing of the store out to it's own spec and you test the fetch in there. Then you don't need to retest that in the Component spec.. Is that correct?


Correct :)


I think I confused this by aliasing fetch as fetchPrice, but leaving rewire$fetch instead of naming that rewire$fetchPrice.

Thanks for this feedback. I need to work on this a little!

code of conduct - report abuse