Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tape-enzyme

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tape-enzyme

tape-enzyme micro library

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Tape-Enzyme

npm Version License Build Status

Tape-Enzyme is a micro library that helps you use tape with enzyme.

Installation

  • Use NPM:
npm i --save tape-enzyme

Usage

Tape-Enzyme is a proxy of tape, but it has better functionality.

Import library and use as tape test:

import test from 'tape-enzyme'

You can also add plugins to your current tape instance:

import test from 'tape'
import {registration} from 'tape-enzyme'

export default registration(test)

Use three types of testing utils:

  • Simple - common test methods
  • Enzyme - `enzyme test methods
  • Wrapper - new way of testing with tape

You can add your own methods using init:

.init(methodName, func)

  • @param { String } methodName
  • @param { Function } func

Example:

test.init('notStrictEqual', function (actual, expected, msg) {
  this.operator(actual, '!==', expected, msg)
})

test('notStrictEqual test', t => {
  t.notStrictEqual(3, '3', 'should be not strict equality')
  t.end()
})

Development

Prerequisites
  • You have node installed at v4.0.0+ and npm at v2.0.0+.
  • You are familiar with git.
Setup
$ git clone <this repo>
$ cd tape-enzyme
$ npm install
Tests

Linters:

$ npm run test:lint

Unit tests:

$ npm run test:unit

All tests:

$ npm run test

Contributing

The main purpose of this library is to make writing tests with tape easier. It involves less code while being more expressive and as robust as possible. If you think that we are missing any key features, please open a GitHub issue, or even better, a pull request. Any feedback you have about using tape-enzyme would be greatly appreciated.

License

Tape-enzyme is Apache 2.0 licensed.

Keywords

FAQs

Package last updated on 01 Aug 2017

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