OMG I only just realised why the test framework is called ‘mocha’ 🤦🏻♂️
@hugh Oh man, it took me AGES to wrap my head around it.
@virtualwolf I know it's important and everyone insists on it, and yet on its face it seems so pointless and circular. I know I'm missing something, but all the documentation assumes you understand *waves hands* generally how it works.
@hugh Yeah that was my biggest problem with it as well. I just sent you an invite to the repo that my website lives in, it's using Sails.js but all the stuff in test/services/ is just outright unit testing. LMK if it helps or if you have any questions?
If it's _really_ simple functionality it definitely does seem weird and pointless, but as you run into bugs to fix, I've found writing a failing test then fixing the bug so the test passes to be really helpful.
@virtualwolf 👍🏼 thanks!
@ocertat @virtualwolf this looks like what I need: https://ubuverse.com/introduction-to-node-js-api-unit-testing-with-mocha-and-chai/
Not all that useful for ephemetoot, Mark, but conceptually it's presumably the same.
This is a Mastodon instance primarily for Australasian Galleries, Libraries, Archives, Museums and Records people, and anyone else who wants to hang out with them.