Skip to main content
default.CallTracker.prototype.verify - node__assert.d.ts - Node documentation
method default.CallTracker.prototype.verify

Usage in Deno

```typescript import mod from "node:node__assert.d.ts"; ```
CallTracker.prototype.verify(): void
Iterates through the list of functions passed to tracker.calls() and will throw an error for functions that have not been called the expected number of times. ```js import assert from 'node:assert'; // Creates call tracker. const tracker = new assert.CallTracker(); function func() {} // Returns a function that wraps func() that must be called exact times // before tracker.verify(). const callsfunc = tracker.calls(func, 2); callsfunc(); // Will throw an error since callsfunc() was only called once. tracker.verify(); ```

Return Type

void