make spy decorator
This commit is contained in:
parent
32fed2dd88
commit
f0888ac7bd
2 changed files with 26 additions and 4 deletions
|
|
@ -25,8 +25,7 @@ module.exports = new function init() {
|
|||
spy.args = [].slice.call(arguments)
|
||||
spy.callCount++
|
||||
|
||||
if(fn)
|
||||
return fn.apply(this, arguments)
|
||||
if (fn) return fn.apply(this, arguments)
|
||||
}
|
||||
spy.args = []
|
||||
spy.callCount = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue