Various small fixes and adjustments

This commit is contained in:
Vanilagy
2026-07-09 14:35:25 +02:00
parent 9ced2853fa
commit f0a2bbae37
7 changed files with 58 additions and 34 deletions
@@ -56,3 +56,16 @@ test('Error handling', async () => {
await expect(second).rejects.toThrow();
expect(await third).toBe(3);
});
test('Dangling rejected call', async () => {
const serializer = new ForgivingCallSerializer();
const first = serializer.call(() => executeDelayed(() => {
throw new Error('yo');
}));
await expect(first).rejects.toThrow();
await new Promise(resolve => setTimeout(resolve, 20));
// No error
});