MochAwait
DEPRECATED
Mocha supports this functionality natively now, so there's no need to use this package
Old README
A Mocha wrapper that provides an interface for ES7 async/await. Now you can do async test blocks without having to worry about passing "done" everywhere!
Install:
npm install mochawait
Then:
;; ;
(Where in the example above, doSomeTestSetup
and myAsyncMethod
are ES7
async function or
promises)
Running tests written this way is easy: simply transpile your ES6/7 code
using Traceur, make sure to
include the Traceur runtime (require('traceur/bin/traceur-runtime')
), and
run with mocha
as per usual:
mocha my-specs.js
Run tests for this project:
npm test