Yesterday I resolved to thoroughly test my current project before building any new features.
Figured the best place to start would be in a control flow library I wrote, which is used all over the API server. I use it to make complex processes manageable and readable.
Comments are practically redundant because the name of each step explains what the snippet of code does.
I use the library all over the codebase, so it makes sense to thoroughly test it and proceed from there.
Imagine how humbled I was when it failed 20% of my tests.
I may have gotten away with this for as long as I was the only person using it, but as soon as anyone else decided to use cjs-task, they had a 1 in 5 chance of having it fail them unexpectedly.
I’ve been building on a shaky codebase.
Time to pass all the tests. Then write some more.
Note to self: WRITE AUTOMATED TESTS, STUPID.