offload/__test__/throw-error.worker.ts

7 lines
164 B
TypeScript
Raw Normal View History

2024-10-25 21:19:39 +00:00
import { handler } from "../mod.ts";
handler(async () => {
await new Promise((resolve) => setTimeout(resolve, 1000));
throw new Error("This is an error");
});