I need your advice on testing React. I want to mock API responses, but without using a complex Docker setup. Ideally, a way to simply say what fetch should return. Then I can test that the UI correctly responds to every scenario provided by the API contract. Was thinking Jest.
It's a bit fiddly to get setup initially, but it does work fairly well.
The other way I've done it is to have the calling function/class take a fetchFn, which defaults to native fetch, but for tests I can pass a mocked function in instead
I'm so exhausted by various self-hosted projects that say "It's easy to host on {Netlify|Vercel|CloudFlare}" with no thought about what happens when those companies no longer offer a free tier, get too expensive, or you just want to move off of them. One specific host as part of the infrastructure is a terrible idea.
@robb@bendaubney My Dad had it and it's still his favourite phone. I remember him giddily watching Spiderman 3 on it, because it came preloaded and it was the first time he'd ever been able to watch a video on a phone.
@belldotbz@hdv I feel like the ActivityPub spec should be extended so that metadata like open graph images can be sent along with posts containing links, so they're only fetched once. The caveat to that being it becomes hard to update it once it's out - but that's already the case, so 🤷🏻♂️
I’m very glad I prepared my first weeks #WeblogPoMo2024 posts. Moving house this weekend and we won’t have internet until Tuesday at the earliest, so no chance to write anything this weekend
@robb@maique I have a somewhat-similar situation with my school friends. Both my first and surnames are also first names, so teachers always called me “Dale”, which stuck to the point where I just went by Dale until I went to uni.
There are people I was friends with for years who had no idea my name was Lewis
On the toggle part, a fair few of them are built into Raycast by default - searching "toggle" gives me the ability to toggle dark mode, bluetooth, fullscreen, mute etc