Socket
Socket
Sign inDemoInstall

timed-tape

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

timed-tape

Prints the time each tape test took


Version published
Weekly downloads
22
decreased by-4.35%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

FAQs

Package last updated on 01 Sep 2016

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc