mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-08-17 12:18:31 -07:00
fix(stats): keep lexical rollup backfill async
This commit is contained in:
@@ -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();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user