JSPM

@mapbox/dynalite-tape

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q24840F
  • License ISC

simple wrapper for dynalite that returns a tape interface and keeps a dynalite instance running

Package Exports

  • @mapbox/dynalite-tape

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@mapbox/dynalite-tape) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

dynalite-tape

This is a simple wrapper for dynalite that takes and returns a tape interface.

The main goal of this module is to let you setup one dynalite instance to be used by many tape interface testing frameworks.

Usage

var opts = {}; // the same options available on dynalite
var dynaliteTape = require('dynalite-tape')(opts);
var test = dynaliteTape(require('tape'));

test('a test', function(assert) {
  assert.pass('a test ran');
  assert.end();
});

test('b test', function(assert) {
  assert.pass('b test ran');
  assert.end();
});

The above code will result in an output that looks like this:

TAP version 13
# [setup dynalite]
# a test
ok 1 a test ran
# [teardown dynalite]
# [setup dynalite]
# b test
ok 2 b test ran
# [teardown dynalite]
dynalite is being closed
dynalite is closed

1..2
# tests 2
# pass  2

# ok