Skip to content

Commit b4f6b5f

Browse files
authored
update compatibility test to report on error responses (#224)
1 parent 421e8ef commit b4f6b5f

File tree

6 files changed

+9
-0
lines changed

6 files changed

+9
-0
lines changed

src/tests/inaccessible.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ describe("@inaccessible", () => {
2727
variables: { id: "apollo-federation" },
2828
});
2929

30+
expect(resp).not.toHaveProperty("errors");
3031
expect(resp).toMatchObject({
3132
data: {
3233
product: {

src/tests/key.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ describe("@key single", () => {
2626
},
2727
});
2828

29+
expect(resp).not.toHaveProperty("errors");
2930
expect(resp).toMatchObject({
3031
data: {
3132
_entities: [
@@ -70,6 +71,7 @@ describe("@key multiple", () => {
7071
},
7172
});
7273

74+
expect(resp).not.toHaveProperty("errors");
7375
expect(resp).toMatchObject({
7476
data: {
7577
_entities: [
@@ -116,6 +118,7 @@ describe("@key composite", () => {
116118
},
117119
});
118120

121+
expect(resp).not.toHaveProperty("errors");
119122
expect(resp).toMatchObject({
120123
data: {
121124
_entities: [
@@ -174,6 +177,7 @@ describe("repeatable @key", () => {
174177
}
175178
});
176179

180+
expect(entitiesQuery).not.toHaveProperty("errors");
177181
expect(entitiesQuery).toMatchObject({
178182
data: {
179183
_entities: [

src/tests/override.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ describe("@override", () => {
2626
variables: { id: "apollo-federation" },
2727
});
2828

29+
expect(resp).not.toHaveProperty("errors");
2930
expect(resp).toMatchObject({
3031
data: {
3132
product: {

src/tests/provides.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ test("@provides", async () => {
1111
variables: { id: "apollo-federation" },
1212
});
1313

14+
expect(resp).not.toHaveProperty("errors");
1415
expect(resp).toMatchObject({
1516
data: {
1617
product: {

src/tests/requires.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ test("@requires", async () => {
99
variables: { id: "apollo-federation" },
1010
});
1111

12+
expect(resp).not.toHaveProperty("errors");
1213
expect(resp).toMatchObject({
1314
data: {
1415
product: {

src/tests/shareable.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ describe("@shareable", () => {
2626
variables: { id: "apollo-federation" },
2727
});
2828

29+
expect(resp).not.toHaveProperty("errors");
2930
expect(resp).toMatchObject({
3031
data: {
3132
product: {

0 commit comments

Comments
 (0)