(func: T)
| 36 | } |
| 37 | |
| 38 | function once<T extends Function>(func: T): T { |
| 39 | let run = false; |
| 40 | let ret: any = undefined; |
| 41 | return function (...args: any[]) { |
| 42 | if (run) return ret; |
| 43 | run = true; |
| 44 | ret = func(...args); |
| 45 | return ret; |
| 46 | } as any as T; |
| 47 | } |
| 48 | |
| 49 | export const test = createTestInterface({ |
| 50 | beforeEachFunctions: [], |
no outgoing calls
no test coverage detected
searching dependent graphs…