| 1 | import { abortIsolate, env } from 'cloudflare:workers'; |
| 2 | |
| 3 | if (env.topLevelAbort) { |
| 4 | while (true) { |
| 5 | try { |
| 6 | abortIsolate('Abort at top level'); |
| 7 | } catch (e) {} |
| 8 | } |
| 9 | } |
| 10 | |
| 11 | export const crashTest = { |
| 12 | test() { |
| 13 | abortIsolate('test reason'); |
| 14 | }, |
| 15 | }; |