Skip to content

Commit 5c6bf1f

Browse files
committed
Add empty context objects (required by TS types)
1 parent 8331199 commit 5c6bf1f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/apollo-gateway/src/datasources/__tests__/RemoteGraphQLDataSource.test.ts

+7
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ describe('constructing requests', () => {
2222

2323
const { data } = await DataSource.process({
2424
request: { query: '{ me { name } }' },
25+
context: {},
2526
});
2627

2728
expect(data).toEqual({ me: 'james' });
@@ -44,6 +45,7 @@ describe('constructing requests', () => {
4445
query: '{ me { name } }',
4546
variables: { id: '1' },
4647
},
48+
context: {},
4749
});
4850

4951
expect(data).toEqual({ me: 'james' });
@@ -71,6 +73,7 @@ describe('willSendRequest', () => {
7173
query: '{ me { name } }',
7274
variables: { id: '1' },
7375
},
76+
context: {},
7477
});
7578

7679
expect(data).toEqual({ me: 'james' });
@@ -125,6 +128,7 @@ describe('error handling', () => {
125128

126129
const result = DataSource.process({
127130
request: { query: '{ me { name } }' },
131+
context: {},
128132
});
129133
await expect(result).rejects.toThrow(AuthenticationError);
130134
await expect(result).rejects.toMatchObject({
@@ -147,6 +151,7 @@ describe('error handling', () => {
147151

148152
const result = DataSource.process({
149153
request: { query: '{ me { name } }' },
154+
context: {},
150155
});
151156
await expect(result).rejects.toThrow(ForbiddenError);
152157
await expect(result).rejects.toMatchObject({
@@ -169,6 +174,7 @@ describe('error handling', () => {
169174

170175
const result = DataSource.process({
171176
request: { query: '{ me { name } }' },
177+
context: {},
172178
});
173179
await expect(result).rejects.toThrow(ApolloError);
174180
await expect(result).rejects.toMatchObject({
@@ -200,6 +206,7 @@ describe('error handling', () => {
200206

201207
const result = DataSource.process({
202208
request: { query: '{ me { name } }' },
209+
context: {},
203210
});
204211
await expect(result).rejects.toThrow(ApolloError);
205212
await expect(result).rejects.toMatchObject({

0 commit comments

Comments
 (0)