UNPKG

must-call

Version:

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

17 lines (15 loc) 335 B
module.exports.resolve = function() { return new Promise((resolve, reject) => { setTimeout(() => { console.log('call'); resolve(); }, 1000); }); }; module.exports.dntResolve = function() { return new Promise((resolve, reject) => { setTimeout(() => { console.log('not call'); }, 1000); }); };