async calls WIP

This commit is contained in:
Dmitry Vasilev
2022-10-25 02:29:59 +08:00
parent 7c9c74988d
commit 1d1215b718
5 changed files with 98 additions and 12 deletions

View File

@@ -27,12 +27,15 @@ export const assert_code_error = (codestring, error) => {
assert_equal(result.error, error)
}
export const test_initial_state = code => {
return get_initial_state({
export const test_initial_state = (code, state) => {
return get_initial_state(
{
...state,
files: typeof(code) == 'object' ? code : { '' : code},
entrypoint: '',
current_module: '',
})
},
)
}
export const stringify = val =>