(condition: ProfilerEvent | ((args: any[]) => boolean))
| 51 | afterAll(() => setProfiler(null)); |
| 52 | |
| 53 | function findProfilerCall(condition: ProfilerEvent | ((args: any[]) => boolean)) { |
| 54 | let predicate: (args: any[]) => boolean = (_) => true; |
| 55 | if (typeof condition !== 'function') { |
| 56 | predicate = (args: any[]) => args[0] === condition; |
| 57 | } else { |
| 58 | predicate = condition; |
| 59 | } |
| 60 | return profilerSpy.calls |
| 61 | .all() |
| 62 | .map((call: any) => call.args) |
| 63 | .find(predicate); |
| 64 | } |
| 65 | |
| 66 | describe('change detection hooks', () => { |
| 67 | it('should call the profiler for creation and change detection', () => { |
no test coverage detected
searching dependent graphs…