@abelmokadem/tap-spec 中文文档教程
tap-spec
格式化 TAP 输出,如 Mocha 的规范报告
器
Install
npm install tap-spec --save-dev
Usage
Streaming
var test = require('tape');
var tapSpec = require('tap-spec');
test.createStream()
.pipe(tapSpec({
hideError: false // optional
}))
.pipe(process.stdout);
CLI
package.json
{
"name": "module-name",
"scripts": {
"test": "node ./test/tap-test.js | tap-spec"
}
}
然后运行 npm test
Terminal
tape test/index.js | node_modules/.bin/tap-spec
Testling
npm install testling -g
testling test/index.js | node_modules/.bin/tap-spec
tap-spec
Formatted TAP output like Mocha's spec reporter
Install
npm install tap-spec --save-dev
Usage
Streaming
var test = require('tape');
var tapSpec = require('tap-spec');
test.createStream()
.pipe(tapSpec({
hideError: false // optional
}))
.pipe(process.stdout);
CLI
package.json
{
"name": "module-name",
"scripts": {
"test": "node ./test/tap-test.js | tap-spec"
}
}
Then run with npm test
Terminal
tape test/index.js | node_modules/.bin/tap-spec
Testling
npm install testling -g
testling test/index.js | node_modules/.bin/tap-spec