This commit is contained in:
Dmitry Vasilev
2023-05-13 11:13:29 +03:00
parent 8bb4369ba5
commit 5310a0c2d9
4 changed files with 47 additions and 56 deletions

View File

@@ -3231,4 +3231,15 @@ const y = x()`
// Deferred calls should not be record in cache
assert_equal(state.eval_cxt.io_cache.length, 0)
}),
test_only('record io discard prev execution', () => {
// Populate cache
const i = test_initial_state(`Math.random(0)`)
// Run code that does not remove IO patches immediately
const next = COMMANDS.input(i, `await Promise.resolve()`, 0)
const next2 = COMMANDS.input(i, `Math.random(1)`, 0).state
console.log('n', next2.io_cache)
}),
]