()
| 46 | } |
| 47 | |
| 48 | async function runTests() { |
| 49 | |
| 50 | // Simple |
| 51 | await test( |
| 52 | "(AsyncFunctionExpression) Local 1", |
| 53 | async function() { debugger; }, [], |
| 54 | exec_state => { |
| 55 | CheckScopeChain([debug.ScopeType.Local, |
| 56 | debug.ScopeType.Closure, |
| 57 | debug.ScopeType.Script, |
| 58 | debug.ScopeType.Global], exec_state); |
| 59 | CheckScopeContent({}, 0, exec_state); |
| 60 | }); |
| 61 | |
| 62 | await test( |
| 63 | "(AsyncFunctionExpression) Local 1 --- resume normal", |
| 64 | async function() { let z = await 2; debugger; }, [], |
| 65 | exec_state => { |
| 66 | CheckScopeChain([debug.ScopeType.Local, |
| 67 | debug.ScopeType.Closure, |
| 68 | debug.ScopeType.Script, |
| 69 | debug.ScopeType.Global], exec_state); |
| 70 | CheckScopeContent({z: 2}, 0, exec_state); |
| 71 | }); |
| 72 | |
| 73 | await test( |
| 74 | "(AsyncFunctionExpression) Local 1 --- resume throw", |
| 75 | async function() { let q = await 1; |
| 76 | try { let z = await thrower(); } |
| 77 | catch (e) { debugger; } }, [], |
| 78 | exec_state => { |
| 79 | CheckScopeChain([debug.ScopeType.Catch, |
| 80 | debug.ScopeType.Local, |
| 81 | debug.ScopeType.Closure, |
| 82 | debug.ScopeType.Script, |
| 83 | debug.ScopeType.Global], exec_state); |
| 84 | CheckScopeContent({e: 'Exception'}, 0, exec_state); |
| 85 | CheckScopeContent({q: 1}, 1, exec_state); |
| 86 | |
| 87 | }); |
| 88 | |
| 89 | // Simple With Parameter |
| 90 | await test( |
| 91 | "(AsyncFunctionExpression) Local 2", |
| 92 | async function(a) { debugger; }, [1], |
| 93 | exec_state => { |
| 94 | CheckScopeChain([debug.ScopeType.Local, |
| 95 | debug.ScopeType.Closure, |
| 96 | debug.ScopeType.Script, |
| 97 | debug.ScopeType.Global], exec_state); |
| 98 | CheckScopeContent({ a: 1 }, 0, exec_state); |
| 99 | }); |
| 100 | |
| 101 | await test( |
| 102 | "(AsyncFunctionExpression) Local 2 --- resume normal", |
| 103 | async function(a) { let z = await 2; debugger; }, [1], |
| 104 | exec_state => { |
| 105 | CheckScopeChain([debug.ScopeType.Local, |
no test coverage detected
searching dependent graphs…