You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
526 B
24 lines
526 B
var test = require("tap").test; |
|
var nextTick = require('./'); |
|
|
|
test('should work', function (t) { |
|
t.plan(5); |
|
nextTick(function (a) { |
|
t.ok(a); |
|
nextTick(function (thing) { |
|
t.equals(thing, 7); |
|
}, 7); |
|
}, true); |
|
nextTick(function (a, b, c) { |
|
t.equals(a, 'step'); |
|
t.equals(b, 3); |
|
t.equals(c, 'profit'); |
|
}, 'step', 3, 'profit'); |
|
}); |
|
|
|
test('correct number of arguments', function (t) { |
|
t.plan(1); |
|
nextTick(function () { |
|
t.equals(2, arguments.length, 'correct number'); |
|
}, 1, 2); |
|
});
|
|
|