Just pending for callback.
npm install pedding[![NPM version][npm-image]][npm-url]

[![Test coverage][codecov-image]][codecov-url]
[![npm download][download-image]][download-url]


[npm-image]: https://img.shields.io/npm/v/pedding.svg?style=flat-square
[npm-url]: https://npmjs.org/package/pedding
[codecov-image]: https://codecov.io/github/node-modules/pedding/coverage.svg?branch=master
[codecov-url]: https://codecov.io/github/node-modules/pedding?branch=master
[download-image]: https://img.shields.io/npm/dm/pedding.svg?style=flat-square
[download-url]: https://npmjs.org/package/pedding
Useful tools for unit test: Just pending for callback.
``bash`
npm install pedding
CommonJS
`js
const { pending } = require('pedding');
it('should request two resources', done => {
done = pending(2, done);
http.get('http://fengmk2.github.com', res => {
done();
});
http.get('http://www.taobao.com', res => {
done();
});
});
`
ESM and TypeScript
`ts
import { pending } from 'pedding';
it('should request two resources', done => {
done = pending(2, done);
http.get('http://fengmk2.github.com', res => {
done();
});
http.get('http://www.taobao.com', res => {
done();
});
});
``

Made with contributors-img.