| Server IP : 170.10.162.208 / Your IP : 216.73.216.38 Web Server : LiteSpeed System : Linux altar19.supremepanel19.com 4.18.0-553.69.1.lve.el8.x86_64 #1 SMP Wed Aug 13 19:53:59 UTC 2025 x86_64 User : deltahospital ( 1806) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home1/deltahospital/nodevenv/api.delta-hospital.com/20/lib/node_modules/events/tests/ |
Upload File : |
var assert = require('assert');
var mustCallChecks = [];
function runCallChecks() {
var failed_count = 0;
for (var i=0 ; i< mustCallChecks.length; ++i) {
var context = mustCallChecks[i];
if (context.actual === context.expected) {
continue;
}
failed_count++;
console.log('Mismatched %s function calls. Expected %d, actual %d.',
context.name,
context.expected,
context.actual);
console.log(context.stack.split('\n').slice(2).join('\n'));
}
assert(failed_count === 0);
}
after(runCallChecks);
exports.mustCall = function(fn, expected) {
if (typeof expected !== 'number') expected = 1;
var context = {
expected: expected,
actual: 0,
stack: (new Error).stack,
name: fn.name || '<anonymous>'
};
mustCallChecks.push(context);
return function() {
context.actual++;
return fn.apply(this, arguments);
};
};