PPPs 26th April
Progress
I spent yesterday continuing work on setting up the testing framework to be able to test nostr-connected components and hooks.
It was so much fu**ing harder than what it was supposed to be.
They were just a problem after a problem.
Some are related to our project setup, some to the libraries that nostr-tools
and nostr-relaypool
uses under the hood (I'm looking at you noble 🙃
), and many are related to mocking a real-time relay.
My goal was to (if possible), be able to run an in-memory mockup relay that would be started up when tests are started, & closed when tests are finished.
It should also be included in the project by default, so no need to download some extra stuff.
Basically something very similar to what libraries like msw
could provide.
But man it was hard...
Like really hard.
I almost gave up on it entirely several times, until I finally managed to get it to work on 12:30 AM (Yup, after mid-night 🙃)
But I was so happy that it finally actually worked!
Plans
Now with the testing setup ready for nostr-related components/functionalities, I need to write tests for our new in-app notifications feature.
Cause this feature has many cases & edge-cases, so it could make good use of automated testing.
Problems
I really really hope that no more problems like this one(S) appear soon.
Hopefully this was a one-time hard setup, but things should become straight-forward from now on with this.
Links
https://github.com/peakshift/makers.bolt.fun/tree/feat/in-app-notifications