The copyright and license notice is already in the LICENSE file. There is no justifiable reason to also require that it be included in every file, since the individual files are not individually distributed except as part of the entire package.
43 lines
1.1 KiB
JavaScript
43 lines
1.1 KiB
JavaScript
var assert = require('assert');
|
|
|
|
var immediateThis, intervalThis, timeoutThis,
|
|
immediateArgsThis, intervalArgsThis, timeoutArgsThis;
|
|
|
|
var immediateHandler = setImmediate(function () {
|
|
immediateThis = this;
|
|
});
|
|
|
|
var immediateArgsHandler = setImmediate(function () {
|
|
immediateArgsThis = this;
|
|
}, "args ...");
|
|
|
|
var intervalHandler = setInterval(function () {
|
|
clearInterval(intervalHandler);
|
|
|
|
intervalThis = this;
|
|
});
|
|
|
|
var intervalArgsHandler = setInterval(function () {
|
|
clearInterval(intervalArgsHandler);
|
|
|
|
intervalArgsThis = this;
|
|
}, 0, "args ...");
|
|
|
|
var timeoutHandler = setTimeout(function () {
|
|
timeoutThis = this;
|
|
});
|
|
|
|
var timeoutArgsHandler = setTimeout(function () {
|
|
timeoutArgsThis = this;
|
|
}, 0, "args ...");
|
|
|
|
process.once('exit', function () {
|
|
assert.strictEqual(immediateThis, immediateHandler);
|
|
assert.strictEqual(immediateArgsThis, immediateArgsHandler);
|
|
|
|
assert.strictEqual(intervalThis, intervalHandler);
|
|
assert.strictEqual(intervalArgsThis, intervalArgsHandler);
|
|
|
|
assert.strictEqual(timeoutThis, timeoutHandler);
|
|
assert.strictEqual(timeoutArgsThis, timeoutArgsHandler);
|
|
});
|