diff --git a/ts/src/core/loaders/assoc_edge_loader.test.ts b/ts/src/core/loaders/assoc_edge_loader.test.ts index 68795913f..71fa0e180 100644 --- a/ts/src/core/loaders/assoc_edge_loader.test.ts +++ b/ts/src/core/loaders/assoc_edge_loader.test.ts @@ -480,7 +480,7 @@ function commonTests() { const edges = await loader.load(user.id); const twoWay = await loader.loadTwoWay(user.id); // TODO need to flip the edges probably. shouldn't have the source id always be id2 here... - expect(twowayIds.sort()).toStrictEqual(twoWay.map((e) => e.id1).sort()); + expect(twowayIds.sort()).toEqual(twoWay.map((e) => e.id1).sort()); expect(edges.length).toBe(10); expect(twoWay.length).toBe(5); @@ -515,7 +515,7 @@ function commonTests() { const twoWay2 = await loader.loadTwoWay(user.id); // TODO need to flip the edges probably. shouldn't have the source id always be id2 here... - expect(twowayIds.sort()).toStrictEqual(twoWay2.map((e) => e.id1).sort()); + expect(twowayIds.sort()).toEqual(twoWay2.map((e) => e.id1).sort()); // deleted some things here which shouldn't show up here expect(edges2.length).toBe(8); @@ -533,7 +533,7 @@ function commonTests() { expect(twoWay3.length).toBe(3); // same ids as second time - expect(twoWay2.map((e) => e.id1).sort()).toStrictEqual( + expect(twoWay2.map((e) => e.id1).sort()).toEqual( twoWay3.map((e) => e.id1).sort(), ); } else { @@ -541,7 +541,7 @@ function commonTests() { expect(twoWay3.length).toBe(5); // same ids as first time - expect(twoWay.map((e) => e.id1).sort()).toStrictEqual( + expect(twoWay.map((e) => e.id1).sort()).toEqual( twoWay3.map((e) => e.id1).sort(), ); } diff --git a/ts/src/core/query/shared_assoc_test.ts b/ts/src/core/query/shared_assoc_test.ts index 2b7a4b95a..be1d5c86f 100644 --- a/ts/src/core/query/shared_assoc_test.ts +++ b/ts/src/core/query/shared_assoc_test.ts @@ -242,7 +242,7 @@ export function assocTests(ml: MockLogs, global = false) { for (let i = 0; i < this.dataz.length; i++) { let data = this.dataz[i]; - expect(countMap.get(data[0].id)).toStrictEqual(inputs.length); + expect(countMap.get(data[0].id)).toBe(inputs.length); } verifyCountQuery({ numQueries: 3, length: 3 }); } @@ -255,7 +255,7 @@ export function assocTests(ml: MockLogs, global = false) { for (let i = 0; i < this.dataz.length; i++) { let data = this.dataz[i]; - expect(countMap.get(data[0].id)).toStrictEqual(data[1].length); + expect(countMap.get(data[0].id)).toBe(data[1].length); } verifyQuery({ length: this.dataz.length, @@ -1425,7 +1425,7 @@ export function assocTests(ml: MockLogs, global = false) { const ids = await getQuery().queryIDs(); const candidates = getCandidateIDs(); expect(ids.length).toBe(candidates.length); - expect(ids.sort()).toStrictEqual(candidates.sort()); + expect(ids.sort()).toEqual(candidates.sort()); }); test("count", async () => { @@ -1454,7 +1454,7 @@ export function assocTests(ml: MockLogs, global = false) { const ents = await getQuery().queryEnts(); const candidates = getCandidateIDs().sort(); expect(ents.length).toBe(candidates.length); - expect(ents.map((u) => u.id).sort()).toStrictEqual(candidates.sort()); + expect(ents.map((u) => u.id).sort()).toEqual(candidates.sort()); }); test("first", async () => { @@ -1510,10 +1510,10 @@ export function assocTests(ml: MockLogs, global = false) { expect(count).toBe(candidates.length); expect(edges.length).toBe(candidates.length); expect(ents.length).toBe(candidates.length); - expect(edges.map((e) => e.id2).sort()).toStrictEqual( + expect(edges.map((e) => e.id2).sort()).toEqual( candidates.map((u) => u.id).sort(), ); - expect(ents.map((e) => e.id).sort()).toStrictEqual( + expect(ents.map((e) => e.id).sort()).toEqual( candidates.map((u) => u.id).sort(), ); }); @@ -1554,10 +1554,10 @@ export function assocTests(ml: MockLogs, global = false) { expect(count).toBe(candidates.length); expect(edges.length).toBe(candidates.length); expect(ents.length).toBe(candidates.length); - expect(edges.map((e) => e.id2).sort()).toStrictEqual( + expect(edges.map((e) => e.id2).sort()).toEqual( candidates.map((u) => u.id).sort(), ); - expect(ents.map((e) => e.id).sort()).toStrictEqual( + expect(ents.map((e) => e.id).sort()).toEqual( candidates.map((u) => u.id).sort(), ); } @@ -1613,7 +1613,7 @@ export function assocTests(ml: MockLogs, global = false) { expect(count2).toBe(candidates.length); expect(ids.length).toBe(candidates.length); expect(ents.length).toBe(candidates.length); - expect(ents.map((e) => e.id).sort()).toStrictEqual( + expect(ents.map((e) => e.id).sort()).toEqual( candidates.map((u) => u.id).sort(), ); }); @@ -1700,7 +1700,7 @@ export function assocTests(ml: MockLogs, global = false) { const ids = await getQuery().queryIDs(); const candidates = getCandidateIDs(); expect(ids.length).toBe(candidates.length); - expect(ids.sort()).toStrictEqual(candidates.sort()); + expect(ids.sort()).toEqual(candidates.sort()); }); test("count", async () => { @@ -1801,10 +1801,10 @@ export function assocTests(ml: MockLogs, global = false) { expect(count).toBe(candidates.length); expect(edges.length).toBe(candidates.length); expect(ents.length).toBe(user1Visible.length); - expect(edges.map((e) => e.id2).sort()).toStrictEqual( + expect(edges.map((e) => e.id2).sort()).toEqual( candidates.map((u) => u.id).sort(), ); - expect(ents.map((e) => e.id).sort()).toStrictEqual( + expect(ents.map((e) => e.id).sort()).toEqual( user1Visible.map((u) => u.id).sort(), ); }); @@ -1864,10 +1864,10 @@ export function assocTests(ml: MockLogs, global = false) { expect(count).toBe(candidates.length); expect(edges.length).toBe(candidates.length); expect(ents.length).toBe(visible.length); - expect(edges.map((e) => e.id2).sort()).toStrictEqual( + expect(edges.map((e) => e.id2).sort()).toEqual( candidates.map((u) => u.id).sort(), ); - expect(ents.map((e) => e.id).sort()).toStrictEqual( + expect(ents.map((e) => e.id).sort()).toEqual( visible.map((u) => u.id).sort(), ); } diff --git a/ts/src/testutils/query.ts b/ts/src/testutils/query.ts index 95ea37f5b..40c5ce3a8 100644 --- a/ts/src/testutils/query.ts +++ b/ts/src/testutils/query.ts @@ -32,14 +32,12 @@ export function getVerifyAfterEachCursorGeneric< const pagination = query.paginationInfo().get(user.id); if (hasEdge) { - expect(newEdges[0], `${i}`).toStrictEqual(edges[i]); + expect(newEdges[0], `${i}`).toEqual(edges[i]); expect(newEdges.length, `${i}`).toBe( edges.length - i >= pageLength ? pageLength : edges.length - i, ); // verify items are the same in order - expect(newEdges, `${i}`).toStrictEqual( - edges.slice(i, i + newEdges.length), - ); + expect(newEdges, `${i}`).toEqual(edges.slice(i, i + newEdges.length)); } else { expect(newEdges.length, `${i}`).toBe(0); }