mocha-test-utils
A bunch of helpers to aid mocha testing.
check
Use it together with done
to simplify error assertion on asynchronous tests.
;
mockCreator
Use it to create a module mocker. Handy used with Marty to mock all aspects of a module but one or two things.
// __mocks__/index.js;;;;; ActionCreators Constants Container Component Store; // __tests__/store-test.js; const mock = ; // Do stuff with:mockactionCreators;mockcomponent;
propertyDescriptor
Use it to get the propertyDescriptor for specific property on an object. Uses getOwnPropertyDescriptor.
{} ;
wcheck
Use it together with done
to simplify error assertion on asynchronous tests.
It's the same as check but it returns a wrapped function instead. Useful for callbacks.
;
MIT license.