Tape (JavaScript testing framework)
Developer(s) | James Halliday aka substack |
---|---|
Initial release | November 25, 2012 |
Stable release |
4.6.2
/ 2016-09-30 |
Development status | Active |
Written in | JavaScript |
Operating system | Cross-platform |
Type | Unit Test |
License | MIT License |
Website | https://github.com/substack/tape |
Tape is a tap-producing test harness for node and browsers requiring few APIs[1] It can be used for unit and integration testing.[2] Tests are code. So, you can run tests as modules with node[3]
Usage
Example of a passing test.[4]
import test from 'tape';
test('A passing test', (assert) => {
assert.pass('This test will pass.');
assert.end();
});
test('Assertions with tape.', (assert) => {
const expected = 'something to test';
const actual = 'sonething to test';
assert.equal(actual, expected,
'Given two mismatched values, .equal() should produce a nice bug report');
assert.end();
});
See also
References
External links
This article is issued from Wikipedia - version of the 12/5/2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.