node_testhelper:node.js的测试助手

测试助手这个项目的灵感来自Python minitest的一些可以在测试中使用的有用方法。以下是有用的功能: p, pl, ppl github: :作者季柯林如何安装npm install testhelper如何使用p,打印标题。此函数将打印变量名称作为标题。代码: obj = {foo:"bar", baz: {aa:1, bb:2}}; // add a title 'obj' automatically. obj.p()打印结果: obj : { foo: 'bar', baz: { aa: 1, bb: 2 } } pl,打印标题和代码位置。这个函数就像pt,但会在第一行打印代码位置。并且一些编辑器支持转到该文件的行,例如Sublime2。注意:它会在位置信息之前打印一个空行。代码: obj = {foo:"b
zip
node_testhelper-master.zip 预估大小:12个文件
folder
node_testhelper-master 文件夹
file
.gitignore 543B
file
package.json 439B
file
how_publish.txt 337B
file
node_testhelper.TODO 647B
file
README.md 2KB
folder
lib 文件夹
file
testhelper.js 5KB
file
pretty_print_string.js 3KB
file
stack_info.js 3KB
file
original_this.js 2KB
file
CHANGES.md 832B
folder
test 文件夹
file
test_publish.js 255B
file
test_testhelper.js 596B
zip 文件大小:8.67KB