Replies

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

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

🎣

robb, to random
@robb@social.lol avatar
lewis,
@lewis@social.lol avatar

@robb The good news is that it does eventually slow down

The bad news is that by that point Baby Knight will probably be starting school & you get a whole new virus soup to enjoy

lewis, to random
@lewis@social.lol avatar
lewis,
@lewis@social.lol avatar

@sarajw I'm fine thanks, a couple of scrapes and bruises but nothing too serious! Will be avoiding that bridge from now on 😅

robb, to random
@robb@social.lol avatar

Every Phone I've Ever Owned https://rknight.me/blog/every-phone-ive-ever-owned/

Now I've written this I really want to try and buy them all again.

lewis,
@lewis@social.lol avatar

@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.

robb, to random
@robb@social.lol avatar

Can’t believe they called the feedback in the new Apple pencil “haptic" instead of "hand throb”

lewis,
@lewis@social.lol avatar

@robb @jonathanreed So you had so many opportunities to not post this?

belldotbz, to random
@belldotbz@mastodon.social avatar

This is a rather interesting read https://kevquirk.com/mastodon-is-ddosing-me

Hat tip to @hdv for the link

lewis,
@lewis@social.lol avatar

@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 🤷🏻‍♂️

lewis, to random
@lewis@social.lol avatar

I’m very glad I prepared my first weeks posts. Moving house this weekend and we won’t have internet until Tuesday at the earliest, so no chance to write anything this weekend

lewis,
@lewis@social.lol avatar

In other news, buying a superking-sized bed seems like a great idea until you have to move it

robb, to random
@robb@social.lol avatar

7622 https://rknight.me/blog/7622/

Wanna know the ridiculous reason I spell my name with 2 Bs? You got it.

#WeblogPoMo2024

lewis,
@lewis@social.lol avatar

@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

robb, to random
@robb@social.lol avatar
lewis,
@lewis@social.lol avatar

@robb I can't believe it happened.

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

lewis,
@lewis@social.lol avatar

@robb Looks like there are a couple, but also I imagine your Alfred workflows would be transferrable too if you'd rather keep them all in one place

adam, to random
@adam@social.lol avatar

The Fibonacci sequence can be found all throughout the natural world, including on this busted digital McDonalds drive-thru sign.

lewis,
@lewis@social.lol avatar

@adam Guess the milkshake machine was broken again

robb, to random
@robb@social.lol avatar
lewis,
@lewis@social.lol avatar

@robb Taking bets on how long before EchoFeed has a toaster integration

robb, to random
@robb@social.lol avatar
lewis,
@lewis@social.lol avatar

@robb "She speaks clearly, in a way that is reminiscent of a teacher or a steadfast multigrain snack."

Exquisite reporting, I love this

lewis, to cycling
@lewis@social.lol avatar

Finally! 🎉

#BikeTooter

lewis,
@lewis@social.lol avatar

And it came in! It’s so pretty, this is my first ever brand new bike 😍
#BikeTooter #NewBikeDay

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