0.0.3 • Published 8 years ago
tape-enzyme v0.0.3
Tape-Enzyme
Tape-Enzyme is a micro library that helps you use tape with enzyme.
Installation
- Use NPM:
npm i --save tape-enzymeUsage
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:
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
nodeinstalled at v4.0.0+ andnpmat v2.0.0+. - You are familiar with
git.
Setup
$ git clone <this repo>
$ cd tape-enzyme
$ npm installTests
Linters:
$ npm run test:lintUnit tests:
$ npm run test:unitAll tests:
$ npm run testContributing
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.