From 924e59f5670ac74f820ec618f65bde4b77e18de0 Mon Sep 17 00:00:00 2001 From: Dmitry Vasilev Date: Mon, 6 Nov 2023 14:58:02 +0800 Subject: [PATCH] add test --- test/test.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/test/test.js b/test/test.js index a5daa62..fb8a8ae 100644 --- a/test/test.js +++ b/test/test.js @@ -3100,6 +3100,29 @@ const y = x()` assert_equal(moved.active_calltree_node.args, [10]) }), + test('find branch deferred calls', () => { + const code = ` + export const foo = arg => { + return arg + } + foo(1) + ` + const {state: i, on_deferred_call} = test_deferred_calls_state(code) + + // Make deferred call + i.modules[''].foo(2) + + const state = on_deferred_call(i) + const call = get_deferred_calls(state)[0] + assert_equal(call.value, 2) + + // Expand call + const expanded = COMMANDS.calltree.click(state, call.id) + const moved = COMMANDS.move_cursor(expanded, code.indexOf('return arg')) + assert_equal(moved.active_calltree_node.value, 2) + }), + + test('stale id in frame function_call.result.calls bug', () => { const code = ` const x = () => {/*x*/