MCPcopy Index your code
hub / github.com/nodejs/node / runTests

Function runTests

deps/v8/test/debugger/debug/es8/async-function-debug-scopes.js:48–472  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46}
47
48async function runTests() {
49
50// Simple
51await 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
62await 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
73await 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
90await 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
101await 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,

Callers 1

Calls 6

resultFunction · 0.85
testFunction · 0.70
CheckScopeChainFunction · 0.70
CheckScopeContentFunction · 0.70
throwerFunction · 0.70
evalFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…