show arguments as dictionary with names, not as array

This commit is contained in:
Dmitry Vasilev
2023-12-04 17:53:36 +08:00
parent eb6b51f601
commit 2cd62edd9d
2 changed files with 44 additions and 18 deletions

View File

@@ -2120,6 +2120,18 @@ const y = x()`
assert_equal(map_expanded.children.length, 3)
}),
test('value_explorer arguments', () => {
const i = test_initial_state(`
function foo(x, {y}) {
}
foo(1, {y: 2})
`)
const expanded = COMMANDS.calltree.click(i, root_calltree_node(i).children[0].id)
const args = expanded.value_explorer.result.value['*arguments*']
assert_equal(args, {x: 1, y: 2})
}),
test('click native calltree node', () => {
const s = test_initial_state(`Object.fromEntries([])`)
const index = 0 // Where call starts