pedding
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

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.

Package Sidebar

Install

npm i pedding

Weekly Downloads

1,055

Version

2.0.1

License

MIT

Unpacked Size

13.2 kB

Total Files

11

Last publish

Collaborators

  • dead-horse
  • dead_horse
  • fengmk2