better deduce function name

This commit is contained in:
Dmitry Vasilev
2022-11-08 20:06:26 +08:00
parent af6cec2505
commit c870d70f30
2 changed files with 21 additions and 7 deletions

View File

@@ -459,6 +459,14 @@ export const tests = [
)
}),
test('function name from object literal', () => {
const i = test_initial_state(`
const fns = {x: () => 1}
fns.x()
`)
assert_equal(root_calltree_node(i).children[0].fn.name, 'x')
}),
test('function name', () => {
// TODO
/*