timed-tape
Prints the time each tape test took
Last updated 10 years ago by daviddias .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install timed-tape 
SYNC missed versions from official npm registry.

timed-tape

timed-tape extends tape so that each test prints the time taken.

API

Pass the tape module into timed-tape:

var tape = require('timed-tape')(require('tape'))

This will return a tape instance that prints the time that each test took.

Example

var test = require('timed-tape')(require('tape'));

test('Check addition', t => {
  t.equal(1 + 1, 2, 'one plus one is two');
  t.end();
});

test('Check multiplication', t => {
  t.equal(1 * 1, 1, 'one times one is one');
  t.end();
});

Resulting output:

$ node mytest.js
TAP version 13
# Check addition
ok 1 one plus one is two
# time: 17 ms
# Check multiplication
ok 2 one times one is one
# time: 17 ms

1..2
# tests 2
# pass  2

# ok

Current Tags

  • 0.1.1                                ...           latest (10 years ago)

2 Versions

  • 0.1.1                                ...           10 years ago
  • 0.1.0                                ...           11 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |