2.0.1 • Published 11 months ago

pedding v2.0.1

Weekly downloads
3,398
License
MIT
Repository
github
Last release
11 months ago

pedding

NPM version Node.js CI Test coverage npm download Node.js Version PRs Welcome

Useful tools for unit test: Just pending for callback.

Installation

Node.js

npm install pedding

Usage

CommonJS

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

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();
  });
});

License

MIT

Contributors

Contributors

Made with contributors-img.