Skip to content

Commit bf19805

Browse files
authored
Change NeoExpectRelationship (#7002)
* implement toIncludeSameMembers with toEqual * expand comment on reasoning for reimplement
1 parent dfab275 commit bf19805

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/graphql/tests/utils/neo-expect/expect-relationship.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,14 @@ export class NeoExpectRelationship extends NeoExpect {
5656
}
5757
}
5858

59-
/** Use this if expectation is a list an elements order does not matter */
59+
/**
60+
* Use this if expectation is a list an elements order does not matter
61+
* This fn does not use the toIncludeSameMembers on jest bc aura test teardown runs without jest-extended
62+
*/
6063
public async toIncludeSameMembers(expectation: any[]): Promise<void> {
6164
const result = await this.getAll();
6265
try {
63-
expect(result).toIncludeSameMembers(expectation);
66+
expect(new Set(result)).toEqual(new Set(expectation));
6467
} catch (err: any) {
6568
const typeStr = this.type ? `[${this.type}]` : "-";
6669
err.message = `Error on ${this.from} ${typeStr} ${this.to}\n\n ${err.message}`;

0 commit comments

Comments
 (0)