Skip to content

Commit bdec0a4

Browse files
committed
another assertion
1 parent 971318f commit bdec0a4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/shell-api/src/integration.spec.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2782,8 +2782,11 @@ describe('Shell API (integration)', function () {
27822782

27832783
it('returns information for autocomplete', async function () {
27842784
const context = instanceState.getAutocompletionContext();
2785-
const { connectionId, databaseName } =
2786-
context.currentDatabaseAndConnection();
2785+
const dbAndConnection = context.currentDatabaseAndConnection();
2786+
if (!dbAndConnection) {
2787+
throw new Error('No current database and connection found');
2788+
}
2789+
const { connectionId, databaseName } = dbAndConnection;
27872790
const databaseNames = await context.databasesForConnection(
27882791
connectionId
27892792
);

0 commit comments

Comments
 (0)