When using SWR my Vue component doesn't re-fetch the data.

How can I write better unit tests to prevent this from taking down my kn cluster?
4 Replies
benten
bentenOP3y ago
guiz i need help pls, my boss was already on my case about bootstrap 3 breaking prod last week
Develliot
Develliot3y ago
I don't have the answer but are you talking about the Vercel SWR package for caching fetches or are you talking about the caching header property.
benten
bentenOP3y ago
The vercel one
Develliot
Develliot3y ago
For what it's worth SWR is client side so your cluster should be safe.
Test your page component with SWR mocked and test your API that SWR calls. Why test SWR, IMHO Vercel should be testing SWR. If you really want full confidence run docker with an ephemeral stack and seeded data and run cypress tests.
Want results from more Discord servers?
Add your server