Skip to content

Commit

Permalink
Rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Sep 6, 2022
1 parent c6dcc0f commit 7277722
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
3 changes: 1 addition & 2 deletions packages/graphql-yoga/__tests__/error-masking.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,6 @@ describe('error masking', () => {

const body = JSON.parse(await response.text())
expect(body).toStrictEqual({
data: null,
errors: [
{
message: 'Unexpected error.',
Expand All @@ -408,6 +407,6 @@ describe('error masking', () => {
},
],
})
expect(response.status).toEqual(200)
expect(response.status).toEqual(500)
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,18 @@ describe('Persisted Operations', () => {
})
const persistedOperationKey = 'my-persisted-operation'
store.set(persistedOperationKey, '{__typename}')
const response = await request(yoga).post('/graphql').send({
doc_id: persistedOperationKey,
const response = await yoga.fetch('http://yoga/graphql', {
method: 'POST',
headers: {
'content-type': 'application/json',
},
body: JSON.stringify({
doc_id: persistedOperationKey,
}),
})

const body = JSON.parse(response.text)
const body = await response.json()

expect(body.errors).toBeUndefined()
expect(body.data.__typename).toBe('Query')
})
Expand Down

0 comments on commit 7277722

Please sign in to comment.