method assert.CallTracker.prototype.getCalls
#CallTracker.prototype.getCalls(fn: Function): CallTrackerCall[]
Example:
import assert from 'node:assert';
const tracker = new assert.CallTracker();
function func() {}
const callsfunc = tracker.calls(func);
callsfunc(1, 2, 3);
assert.deepStrictEqual(tracker.getCalls(callsfunc),
[{ thisArg: undefined, arguments: [1, 2, 3] }]);
Parameters #
#fn: Function
Return Type #
An array with all the calls to a tracked function.