When you're using a testing framework, do you prefer your test declarations to be global variables like Mocha or Jest? Or to have explicit imports like Ava? import test from 'ava'; test('title', () => {}); vs. // global.test test('title', () => {});
-
-
I expect test output for that one file... I come from the cross-language tap ecosystem, where direct test output is defined protocol that's consumed by test runners. Because it's a protocol, I've written tap tests in everything from C to MySQL.
-
Ahh. I guess I come from (and helped create) a world where when I want to run my JS, it has to be processed anyway, so there’s always at least one level of indirection.
End of conversation
New conversation -
-
-
It should run the tests in that file, and then set the exit code to express whether all tests passed. The key is that when I'm confused about a test's behaviour, it gives me a way to debug a test in the most minimal and isolated manner. For example: node --inspect-brk test.js
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
he/him 