(pattern: string | RegExp)
| 96 | |
| 97 | /** Get calls matching a pattern */ |
| 98 | export function getCallsMatching(pattern: string | RegExp): CommandCall[] { |
| 99 | return calls.filter((c) => { |
| 100 | if (typeof pattern === 'string') return c.command.includes(pattern); |
| 101 | return pattern.test(c.command); |
| 102 | }); |
| 103 | } |
| 104 | |
| 105 | /** Clear recorded calls */ |
| 106 | export function clearCalls() { |
no outgoing calls
no test coverage detected
searching dependent graphs…