Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

must-call

yosuke-furukawa32MIT1.0.0

example.on('end', mustCall(() => {})); Check the callback function is called.

assertion

readme

must-call

npm version Build Status Coverage Status

must-call is an assertion library for async test. This method is inspired from node.js project test/common.js.

const mustCall = require('must-call');

someCallback(mustCall(() => {
  // when callback does not called at the end of the process, 
  // throw exception.
}));

somePromiseTest().then(mustCall(() => {
  // when async test does not resolved at the end of the process, 
  // throw exception.
}));