(f)
| 18 | })`); |
| 19 | |
| 20 | async function test(f) { |
| 21 | try { |
| 22 | await f(new Promise(resolve => setTimeout(resolve))); |
| 23 | assertUnreachable(); |
| 24 | } catch (e) { |
| 25 | assertInstanceof(e, Realm.global(realm).Error); |
| 26 | assertMatches(/Error.+at two.+at async one.+at async test/ms, e.stack); |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | assertPromiseResult((async () => { |
| 31 | %PrepareFunctionForOptimization(one); |
no test coverage detected