Skip to content

Commit

Permalink
chore: update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
L422Y committed Nov 13, 2023
1 parent c0d2d3a commit 0801c21
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/LoadableMap.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe("LoadableMap", () => {
const item = await loadableMap.get("key1")
expect(mockLoadOneFunction).toHaveBeenCalledWith("key1")
expect(item).toEqual({_id: "key1", data: "Data for key1"})
expect(loadableMap["_map"].value.has("key1")).toBeTruthy()
expect(loadableMap["_map"].has("key1")).toBeTruthy()
})

test("should return undefined for nonexistent key", async () => {
Expand Down
4 changes: 2 additions & 2 deletions tests/MegaMap.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ describe("MegaMap", () => {

const item1 = await megaMap.load("key1")
expect(item1).toEqual({_id: "key1", data: "Data for key1"})
expect(secondaryMegaMap["_map"].value.has("key1")).toBeTruthy()
expect(secondaryMegaMap["_map"].value.get("key1")).toEqual(item1)
expect(secondaryMegaMap["_map"].has("key1")).toBeTruthy()
expect(secondaryMegaMap["_map"].get("key1")).toEqual(item1)
})

// test('should throw error when getAll returns no items', async () => {
Expand Down

0 comments on commit 0801c21

Please sign in to comment.