forked from chakra-core/ChakraCore
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathasync_step_out.js
More file actions
36 lines (31 loc) · 1.05 KB
/
Copy pathasync_step_out.js
File metadata and controls
36 lines (31 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
function foo() {
return 100;
}
async function af1(a) {
return await foo();
}
async function af2() {
return await af1(10);
}
var p = 1;/**bp:
resume('step_over');
resume('step_into');
resume('step_into');
resume('step_out');stack();
resume('step_out');stack();**/
// If we put the break point in the below line after stepping out from af2 we will execute the same break
// point again which will add more break points. To avoid this adding the break point to a dummy statement.
p = af2();
p.then(result => {
if (result === 100) {
print("PASS");
}
},
error => {
print("Failed : " + error);
}
);