()
| 12 | const countingLoader = (options?: { readonly fail?: boolean }) => { |
| 13 | let calls = 0; |
| 14 | const loader: ArtifactRendererLoader = async () => { |
| 15 | calls += 1; |
| 16 | if (options?.fail) { |
| 17 | // oxlint-disable-next-line executor/no-try-catch-or-throw, executor/no-error-constructor -- boundary: simulating a bundler's failed dynamic import, which rejects with a plain Error |
| 18 | throw new Error("chunk unavailable"); |
| 19 | } |
| 20 | return { default: (() => null) as never }; |
| 21 | }; |
| 22 | return { |
| 23 | loader, |
| 24 | calls: () => calls, |
no outgoing calls
no test coverage detected