collect logs from failed call

This commit is contained in:
Dmitry Vasilev
2022-11-15 16:01:13 +08:00
parent e24e88625c
commit 97e952f2d3
2 changed files with 7 additions and 11 deletions

View File

@@ -2259,11 +2259,15 @@ const y = x()`
'x' : `
const has_child_calls = i => i == 0 ? 0 : has_child_calls(i - 1)
has_child_calls(10)
console.log('log')
throw new Error('fail')
`,
})
assert_equal(root_calltree_node(s).module, 'x')
// Must collect logs from failed module
assert_equal(s.logs.logs.length, 1)
const s2 = COMMANDS.move_cursor(
COMMANDS.change_current_module(s, 'x'),
s.files['x'].indexOf('throw')