UNPKG
assert-called
Version:
latest (0.1.2-1)
0.1.2
0.1.2-1
0.1.1
0.1.0
0.0.1
Assert that your callback got called
github.com/mmalecki/assert-called
mmalecki/assert-called
assert-called
/
examples
/
called-and-not-called.js
14 lines
(9 loc)
•
173 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
var
cb =
require
(
'../'
);
function
notCalling
(
cb
) { }
function
notCalled
(
) { } process.
nextTick
(
cb
(
function
(
) {
console
.
log
(
'called'
); }));
notCalling
(
cb
(notCalled));