fix(code-runtime): support SEA startup and immediate control writes
This commit is contained in:
1 parent
98d3af0683
commit
7f5eb6db9a
19 files changed
+145
-49
No files matched your search
@@ -100,6 +100,13 @@ describe('Node program process', () => {
|
||||
expect((await run({ program, bindings: [] })).error?.kind).toBe('timeout')
|
||||
})
|
||||
|
||||
it('retains console output emitted immediately before a non-yielding program', async () => {
|
||||
const { run } = await setup({ timeoutMs: 1000, graceMs: 50 })
|
||||
const result = await run({ program: 'console.log("before hot loop"); for (;;) {}', bindings: [] })
|
||||
expect(result.error?.kind).toBe('timeout')
|
||||
expect(result.logs).toEqual(['before hot loop'])
|
||||
})
|
||||
|
||||
it('does not pause the deadline while a binding is pending', async () => {
|
||||
const { run } = await setup({ timeoutMs: 1000, graceMs: 50 })
|
||||
const result = await run({ program: 'void tools.wait({}); for (;;) {}', bindings: bindings({ wait: () => new Promise(() => {}) }) })
|
||||
|
||||
Reference in new issue
Block a user