Skip to content

Commit 7c66e98

Browse files
committed
test(service-datasource): await the factory's create in the read-only refusal pin, so tsc reads it
Claude-Session: https://claude.ai/code/session_01QK6pdbxKZiHdFApL8RYVh9 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 0230271 commit 7c66e98

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

‎packages/services/service-datasource/src/__tests__/sqlite-driver-fallback-readonly-unopenable.test.ts‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,12 @@ describe('the read-only boot os migrate plan composes: a declared SQLite datasou
164164
const factory = createDefaultDatasourceDriverFactory({ dev: true, sqliteAbsentFile: 'empty-in-memory' });
165165
const filename = join(dir, 'plain', 'archive.db');
166166
let refusal: unknown;
167-
await factory
168-
.create({ name: 'archive', driver: 'sqlite', config: { filename } } as any)
169-
.then((handle) => { opened.push({ driver: handle.driver ?? handle } as any); })
170-
.catch((e: unknown) => { refusal = e; });
167+
try {
168+
const handle = await factory.create({ name: 'archive', driver: 'sqlite', config: { filename } } as any);
169+
opened.push({ driver: handle.driver ?? handle } as any);
170+
} catch (e) {
171+
refusal = e;
172+
}
171173
expectFileRefusal(refusal, filename, 'ENOTDIR');
172174
});
173175

0 commit comments

Comments
 (0)