* The compiled worker beside us; Vitest loads `src/` but builds `dist/` before * the tests, so it uses that copy. Null when neither exists.
()
| 38 | * the tests, so it uses that copy. Null when neither exists. |
| 39 | */ |
| 40 | function workerFile(): string | null { |
| 41 | const sibling = path.join(__dirname, 'tokenize-worker.js'); |
| 42 | if (existsSync(sibling)) return sibling; |
| 43 | const built = path.resolve(__dirname, '../../../dist/ui-server/highlight/tokenize-worker.js'); |
| 44 | return existsSync(built) ? built : null; |
| 45 | } |
| 46 | |
| 47 | /** Settle everything waiting on the current worker and forget it. */ |
| 48 | function retire(outcome: BoundedTokenize): void { |
no test coverage detected