@lewis@social.lol avatar

lewis

@lewis@social.lol

Senior software engineer, cyclist, film lover, sci-fi and horror reader, and a Dad

Substitutes obsession with bikes for a personality.

Harmful to aquatic life. Dispose responsibly.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

lewis, to random
@lewis@social.lol avatar

📝 New post: Adding some slashpages

Inspired by the release of slashpages.net, I've added a couple to my blog

🔗 https://lewisdale.dev/post/adding-some-slashpages/

#WeblogPoMo2024

afilina, to random
@afilina@phpc.social avatar

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.

lewis,
@lewis@social.lol avatar

@afilina I've used this before: https://mswjs.io/docs/integrations/node/

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

robb, to random
@robb@social.lol avatar

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.

Do you know what's nice and easy to install on a server and not locked to one vendor? PHP. https://rknight.me/notes/202405211209/

lewis,
@lewis@social.lol avatar

@robb I didn't even realise people wrote PHP anymore

🎣

lewis, to random
@lewis@social.lol avatar

📝 New post: My favourite albums

It's Saturday, so let's take a break from Golang to hear a rundown of my 5 favourite albums

🔗 https://lewisdale.dev/post/my-favourite-albums/

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • kavyap
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • osvaldo12
  • khanakhh
  • Youngstown
  • mdbf
  • slotface
  • rosin
  • everett
  • ngwrru68w68
  • Durango
  • anitta
  • InstantRegret
  • GTA5RPClips
  • cubers
  • ethstaker
  • normalnudes
  • tacticalgear
  • cisconetworking
  • tester
  • Leos
  • modclub
  • megavids
  • provamag3
  • lostlight
  • All magazines