()
| 28 | return { |
| 29 | destroy, |
| 30 | run() { |
| 31 | $.flush(() => { |
| 32 | $.set(head, 1); |
| 33 | }); |
| 34 | assert.equal($.get(sum), 2 * width); |
| 35 | counter = 0; |
| 36 | for (let i = 0; i < 500; i++) { |
| 37 | $.flush(() => { |
| 38 | $.set(head, i); |
| 39 | }); |
| 40 | assert.equal($.get(sum), (i + 1) * width); |
| 41 | } |
| 42 | assert.equal(counter, 500); |
| 43 | } |
| 44 | }; |
| 45 | }; |