How many characters arrays were joined into while `run` ran.
(run: () => void)
| 95 | describe('a receiver read back from a minified line', () => { |
| 96 | /** How many characters arrays were joined into while `run` ran. */ |
| 97 | function joinedDuring(run: () => void): number { |
| 98 | const join = Array.prototype.join; |
| 99 | let chars = 0; |
| 100 | Array.prototype.join = function (this: unknown[], separator?: string): string { |
| 101 | const text = join.call(this, separator); |
| 102 | chars += text.length; |
| 103 | return text; |
| 104 | }; |
| 105 | try { |
| 106 | run(); |
| 107 | } finally { |
| 108 | Array.prototype.join = join; |
| 109 | } |
| 110 | return chars; |
| 111 | } |
| 112 | |
| 113 | /** |
| 114 | * Runs `refs` through the check for a call written on `window.App…`, which |