Skip to main content


Oh, you have 309 tests and 100% code coverage? That’s nice.

🤦‍♂️

#dev #JSDB
#dev #jsdb
in reply to Aral Balkan

Just because you run through every line of code while testing, doesn't mean at all these are bug free. Most tests in TDD are positive tests ("Putting A into function B results in behaviour C"), confining undefined behaviour especially in dynamicly typed languages, is a very different beast :D

The simple line:

result = input + 1

in JS has some many potential results, that you have to cover this line multiple times :D
in reply to Aral Balkan

I find that more often than not, tests are only written to pass that arbitrary code coverage threshold needed for the pipeline to accept the commit :)
in reply to flip1

@flip1 Haha, not in this case but yes, folks love to game systems :)
in reply to Aral Balkan

One must be a simple person to game their own system :D
in reply to Aral Balkan

Off-topic: that's a beautiful theme! Is that just the terminal or the desktop's theme?
in reply to Ru (Tech) :blobcatsadlife:

@ru Ah, thanks :) It’s the Pencil theme on Black Box terminal.

Black Box has built-in support for GNOME’s dark and light (oops, I mean “mixed” mode – https://ar.al/2022/08/17/lipstick-on-a-pig/) mode and it supports themes for each.

#BlackBox #terminal #GNOME #colourSchemes
Unknown parent

flip1
@zladuric This is the perfect approach. Writing a test to prove things work right now is useless (duh, you know what use case you designed it for, of course it will work). Defending your project against the future idiot who is going to f things up (most likely yourself) is the right attitude and will lead to proper tests. Love it!
in reply to flip1

@flip1 @zladuric Exactly. The value of the tests is that as I fix this, I know that there are 309 previous assumptions that I know I’m not violating. Tests are a safety net.