drag-race
Run mocha style tests in parallel.
Test Examples
The syntax is meant to be identical to mocha. There is only one caveat to this approach: each test receives a context object so that when they run in parallel the test can use the same context that the before
and beforeEach
used, and subsequently, the afterEach
and after
.
Everything is promise based using bluebird under the hood but node style callbacks are still supported.
'use strict'; const B = ;const expect = expect; ; describe; describe; ;
CLI Usage
Simply use the executable provided within ./node_modules/.bin
called drag-race
:
./node_modules/.bin/drag-race ./test
Or in an npm script:
"scripts": ,
npm test
Concurrency
By default, all tests will run in parallel with concurrency of Infinity
. You may set this number by using the -c
flag:
drag-race -c 10 ./test
Observers
By default the console
observer will be used to spit out whether or not tests pass. You may extend the BaseObserver
class and provide either a module name or a relative path with the -o
, --observer
options in the command line. Simply override the super's methods and do whatever logic you want. There is no need to call super's method in the overridden methods.
License
This software is licensed under the MIT license.