This commit is contained in:
Dmitry Vasilev
2022-11-29 03:37:15 +08:00
parent 1c07a092e7
commit 0332d5a0b8
4 changed files with 21 additions and 17 deletions

View File

@@ -2241,14 +2241,16 @@ const y = x()`
}),
test('get_initial_state toplevel not entrypoint', () => {
const s = COMMANDS.get_initial_state({
files: {
const s = test_initial_state(
{
'' : `import {x} from 'x'; x()`,
'x' : `export const x = () => 1; x()`,
},
entrypoint: '',
current_module: 'x',
})
{
entrypoint: '',
current_module: 'x',
}
)
assert_equal(s.current_calltree_node.toplevel, true)
assert_equal(s.active_calltree_node, null)
}),