FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

node-modules/pedding: Just pedding for callback. · GitHub

Repository files navigation

pedding

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

Made with contributors-img.

About

Just pedding for callback.

Resources

Stars

13 stars

Watchers

10 watching

Forks

Releases

Used by

Contributors

Languages


Back | FazBrowse Home | New Git URL