Skip to content

Commit a211961

Browse files
committed
Fix test 6797
1 parent 2da1acd commit a211961

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

packages/graphql/tests/integration/issues/6797.int.test.ts

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ describe("https://github.com/neo4j/graphql/issues/6797", () => {
102102
${Group.plural} {
103103
invitees {
104104
email
105+
group {
106+
id
107+
}
105108
}
106109
}
107110
}
@@ -116,12 +119,24 @@ describe("https://github.com/neo4j/graphql/issues/6797", () => {
116119
[Group.operations.create]: {
117120
[Group.plural]: [
118121
{
119-
invitees: [{ email: "an email" }],
122+
invitees: [
123+
{
124+
email: "an email",
125+
group: expect.toIncludeSameMembers([
126+
{
127+
id: "an-id",
128+
},
129+
{
130+
id: expect.toBeString(),
131+
},
132+
]),
133+
},
134+
],
120135
},
121136
],
122137
},
123138
});
124139

125-
testHelper.expectRelationship("Group", "Invitee", "INVITED_TO");
140+
await testHelper.expectRelationship(Invitee, Group, "INVITED_TO").count(2);
126141
});
127142
});

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export class NeoExpectNode extends NeoExpect {
3535
public async count(expected: number): Promise<void> {
3636
const count = await this.getCount();
3737
if (count !== expected) {
38-
throw new NeoAssertionError("Incorrect count");
38+
throw new NeoAssertionError(`Incorrect count, expected ${expected}, found ${count}`);
3939
}
4040
}
4141

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export class NeoExpectRelationship extends NeoExpect {
5959
public async count(expected: number): Promise<void> {
6060
const count = await this.getCount();
6161
if (count !== expected) {
62-
throw new NeoAssertionError("Incorrect count");
62+
throw new NeoAssertionError(`Incorrect count, expected ${expected}, found ${count}`);
6363
}
6464
}
6565

0 commit comments

Comments
 (0)