| 3741 | } |
| 3742 | |
| 3743 | function wrapAsyncCompare(name, matcherFactory) { |
| 3744 | return function() { |
| 3745 | // Capture the call stack here, before we go async, so that it will contain |
| 3746 | // frames that are relevant to the user instead of just parts of Jasmine. |
| 3747 | const errorForStack = j$.util.errorWithStack(); |
| 3748 | |
| 3749 | return this.expector |
| 3750 | .compare(name, matcherFactory, arguments) |
| 3751 | .then(result => { |
| 3752 | this.expector.processResult(result, errorForStack); |
| 3753 | }); |
| 3754 | }; |
| 3755 | } |
| 3756 | |
| 3757 | function addCoreMatchers(prototype, matchers, wrapper) { |
| 3758 | for (const matcherName in matchers) { |