Skip to content

Commit 23d073f

Browse files
committed
the tap was too confusing here to spare bottomport
1 parent 76dbdd9 commit 23d073f

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/callback.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import _ from './util/lodash-wrap'
22
import create from './matchers/create'
33

4-
export default _.tap(create({
4+
const callback = create({
55
name: 'callback',
66
matches (matcherArgs, actual) {
77
return _.isFunction(actual)
@@ -10,8 +10,10 @@ export default _.tap(create({
1010
matcherInstance.args = matcherArgs
1111
matcherInstance.__testdouble_callback = true
1212
}
13-
}), (callback) => {
14-
// Make callback itself quack like a matcher for its non-invoked use case.
15-
callback.__name = 'callback'
16-
callback.__matches = _.isFunction
1713
})
14+
15+
// Make callback itself quack like a matcher for its non-invoked use case.
16+
callback.__name = 'callback'
17+
callback.__matches = _.isFunction
18+
19+
export default callback

0 commit comments

Comments
 (0)