(id?: number)
| 595 | * @param id The id of the session to restore. If not provided, all mocks registered in the current session are restored. |
| 596 | */ |
| 597 | export function restore(id?: number) { |
| 598 | id ??= (sessions.length || 1) - 1; |
| 599 | while (id < sessions.length) { |
| 600 | const session = sessions.pop(); |
| 601 | if (session) { |
| 602 | for (const value of session) { |
| 603 | value.restore(); |
| 604 | } |
| 605 | } |
| 606 | } |
| 607 | } |
| 608 | |
| 609 | /** Wraps an instance method with a Spy. */ |
| 610 | function methodSpy< |
no test coverage detected