OMG I only just realised why the test framework is called ‘mocha’ 🤦🏻‍♂️


Still don’t understand unit testing though.

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

@hugh @virtualwolf I wish I could write some tests for ephemetoot, but I'm not there yet. The steep learning curve has me only writing tests that are really dumb.

@ocertat @virtualwolf this looks like what I need:

Not all that useful for ephemetoot, Mark, but conceptually it's presumably the same.

Sign in to participate in the conversation
Aus GLAM Space

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.