fix(stats): keep lexical rollup backfill async

This commit is contained in:
2026-08-15 22:46:00 -07:00
parent e53f6d61ff
commit 05da8cf86a
6 changed files with 45 additions and 12 deletions
@@ -54,3 +54,16 @@ test('lexical rollup worker module resolves in the current layout', () => {
assert.ok(workerPath, 'expected the lexical rollup worker module to resolve');
assert.ok(workerPath.endsWith(__filename.endsWith('.ts') ? '.ts' : '.js'));
});
test('lexical rollup worker leaves a backfill pending when no worker can start', async () => {
const runtime = new LexicalRollupWorkerRuntime({
resolveWorkerPath: () => null,
warn: () => {},
} as never);
try {
await assert.doesNotReject(runtime.run('/tmp/not-used.sqlite'));
} finally {
runtime.destroy();
}
});