Skip to content

Commit

Permalink
Adds extra event to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ncordon committed Dec 21, 2024
1 parent 9d76d04 commit 961e357
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ suite('Connection service spec', () => {
assert.strictEqual(returnedPassword2, 'mock-password-2');
});

test('Should notify language server when a Connection is deleted', async () => {
test.only('Should notify language server when a Connection is deleted', async () => {
const sendNotificationSpy = sandbox.spy(
mockLanguageClient,
'sendNotification',
Expand All @@ -203,16 +203,22 @@ suite('Connection service spec', () => {
mockConnection,
'mock-password',
);

sendNotificationSpy.resetHistory();
await connection.deleteConnectionAndUpdateDatabaseConnection(
mockConnection.key,
);

sandbox.assert.calledTwice(sendNotificationSpy);
sandbox.assert.calledWithExactly(
sendNotificationSpy,
sendNotificationSpy.getCall(0),
'connectionDisconnected',
undefined,
);
sandbox.assert.calledWith(
sendNotificationSpy.getCall(1),
'relintDocuments',
undefined,
);
});
});

Expand Down

0 comments on commit 961e357

Please sign in to comment.