Are your tests fast or slow? An opinionated testing framework.
This module is still under heavy development, but if you are cool with this:
npm install fast-or-slow
After lots of trial and error, I have come to realize that there is only one thing I care about when writing tests - are they fast, or are they slow?
Seriously, who gives a fuck if you are unit testing with crazy mocks & stubs or doing end to end tests involving all parts of your application?
The important thing is that you write tons of tests, and that you can execute them very quickly to have short feedback loops.
var test = ;;;;
Running this test is as simple as:
$ node test-example.js! Slow tests are bad (line 9 in test/fast/example/test-example.js)Error: Timeout: test ran longer than 100ms (took 102ms)at Test.timeoutError (/Users/felix/code/node-fast-or-slow/lib/test.js:136:13)at Object.doneCb (/Users/felix/code/node-fast-or-slow/lib/test.js:74:50)at Timer.callback (timers.js:83:39)$ echo $?1
Also, did you notice the awesome line number indications? Try this:
$ node test-example.js | grep !! Slow tests are bad (line 9 in test/fast/example/test-example.js)
Seriously, why doesn't every testing framework work this way?
The before / after functions are executed for every test:
var test = ;var mysql = ;test;test;;