bdd-wrappers
BDD wrappers for jasmine and mocha describe/it to help writing tests in GIVEN WHEN THEN AND fashion so you can write:
;
Instead of:
;
When a test fails, the trace will correctly output GIVEN a gremlin WHEN I feed it THEN is happy.
Installation
npm install bdd-wrappers
How to use
This will add the GIVEN, WHEN, AND, THEN functions to the global object
; ;
You can also define your own wrappers. The first parameter is a string and will prefix the string describing the test.
var wrap = wrap; // A wrapper for it(...);GLOBALSHOULD = ; // So:;// will ouput: SHOULD so something // A wrapper for describe(...);GLOBALOR = ;
LICENSE
MIT