New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

taptap

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

taptap

simple testing function

latest
Source
npmnpm
Version
0.0.3
Version published
Maintainers
1
Created
Source

taptap

taptap is simple testing function. you give a test function with "done" param. like that:

var test = require('taptap');
var assert = require('assert');

test(function (done) {
  assert(1);
  done();
});

you should always call "done". taptap will timeout in 2s, you can't alter it.

taptap produces results in tap format (i suppose..).

there may be two reasons when test failed:

  • there were uncaught exceptions in your test functions. like those produced by assertions, for example
  • your test function did not call "done"

in these cases taptap will output stacktrace for the first case and "hanger" test function source code in the second case.

taptap writes to stdout but you could give it another stream to write to if you want. call .pipe on it, like this

var test = require('taptap');
var stream = require('stream').Transform;

test.pipe(new stream).pipe(new stream);

[your tests...]

you could also .skip and .todo tests. like this:

var test = require('taptap');

test.skip(function () {
});

test.todo(function () {
  throw new Error;
});

skip tests are always "ok", todo tests may be either "not ok" (if they don't pass) or "ok" if they pass (gives bonus!).

please check that your test functions are indeed functions!

FAQs

Package last updated on 10 May 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts