【文件属性】:
文件名称:tape-extra:在磁带中添加beforeEachafterEach
文件大小:2KB
文件格式:ZIP
更新时间:2021-05-11 08:52:49
JavaScript
带式
现在,在添加beforeEach / afterEach
用法
var test = require ( 'tape-extra' )
var count = 0
test . beforeEach = function ( done ) {
console . log ( 'before' , ++ count )
setTimeout ( done , 100 )
}
test . afterEach = function ( done ) {
console . log ( 'after' , count )
setTimeout ( done , 100 )
}
test ( 'fun is fun' , function ( t ) {
t . equal ( 'fun' , 'fun' )
t . end ( )
} )
test ( 'fun i
【文件预览】:
tape-extra-master
----index.js(957B)
----package.json(399B)
----test()
--------index.js(559B)
----example.js(386B)
----.gitignore(13B)
----README.md(572B)