From fe0f75bcc07231e64dd3e3bacd83289a6df89d58 Mon Sep 17 00:00:00 2001 From: Dmitry Vasilev Date: Sun, 15 Jan 2023 10:01:11 +0800 Subject: [PATCH] add async/await move cursor test --- test/test.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/test.js b/test/test.js index 5b5173f..a5e6c35 100644 --- a/test/test.js +++ b/test/test.js @@ -2901,4 +2901,16 @@ const y = x()` assert_equal(after_edit_finished.active_calltree_node.fn.name, 'f') }), + test('async/await move_cursor', async () => { + const code = ` + const f = async () => { + 1 + } + await f() + ` + const i = await test_initial_state_async(code) + const {state: after_move} = await COMMANDS.move_cursor(i, code.indexOf('1')) + assert_equal(after_move.active_calltree_node.fn.name, 'f') + }), + ]