Fix failing tests

Also:
- Address comments in PR
- Add changelog note
This commit is contained in:
Andrew Eisenberg
2024-05-22 22:55:59 +00:00
parent 6c92a5b800
commit 088d2fa91e
5 changed files with 22 additions and 17 deletions

View File

@@ -140,7 +140,8 @@ describe("local databases", () => {
},
]);
expect(onDidChangeDatabaseItem).toHaveBeenCalledWith({
item: undefined,
fullRefresh: true,
item: mockDbItem,
kind: DatabaseEventKind.Add,
});
@@ -152,7 +153,8 @@ describe("local databases", () => {
expect((databaseManager as any)._databaseItems).toEqual([]);
expect(updateSpy).toHaveBeenCalledWith("databaseList", []);
expect(onDidChangeDatabaseItem).toHaveBeenCalledWith({
item: undefined,
fullRefresh: true,
item: mockDbItem,
kind: DatabaseEventKind.Remove,
});
});
@@ -175,7 +177,8 @@ describe("local databases", () => {
]);
expect(onDidChangeDatabaseItem).toHaveBeenCalledWith({
item: undefined,
fullRefresh: true,
item: mockDbItem,
kind: DatabaseEventKind.Rename,
});
});
@@ -198,7 +201,8 @@ describe("local databases", () => {
]);
const mockEvent = {
item: undefined,
fullRefresh: true,
item: mockDbItem,
kind: DatabaseEventKind.Add,
};
expect(onDidChangeDatabaseItem).toHaveBeenCalledWith(mockEvent);