mirror of
https://github.com/leporello-js/leporello-js
synced 2026-03-21 16:34:29 -07:00
do not lose setting on file access revoked
This commit is contained in:
@@ -69,7 +69,8 @@ console.time('run')
|
||||
|
||||
const i = test_initial_state(
|
||||
{}, // files
|
||||
{project_dir: dir, entrypoint: 'test/run.js'}
|
||||
{entrypoint: 'test/run.js'},
|
||||
{project_dir: dir}
|
||||
)
|
||||
|
||||
assert_equal(i.loading_external_imports_state != null, true)
|
||||
|
||||
@@ -98,15 +98,18 @@ export const assert_code_error_async = async (codestring, error) => {
|
||||
assert_equal(result.error, error)
|
||||
}
|
||||
|
||||
export const test_initial_state = (code, state) => {
|
||||
export const test_initial_state = (code, entrypoint_settings, other) => {
|
||||
return COMMANDS.open_run_window(
|
||||
COMMANDS.get_initial_state(
|
||||
{
|
||||
files: typeof(code) == 'object' ? code : { '' : code},
|
||||
...other
|
||||
},
|
||||
{
|
||||
entrypoint: '',
|
||||
current_module: '',
|
||||
...state,
|
||||
},
|
||||
...entrypoint_settings,
|
||||
}
|
||||
),
|
||||
new Set(Object.getOwnPropertyNames(globalThis.run_window))
|
||||
)
|
||||
@@ -150,7 +153,7 @@ export const test_deferred_calls_state = code => {
|
||||
}
|
||||
`))()
|
||||
|
||||
const state = test_initial_state(code, { on_deferred_call })
|
||||
const state = test_initial_state(code, null, { on_deferred_call })
|
||||
|
||||
return {
|
||||
state,
|
||||
|
||||
Reference in New Issue
Block a user