Skip to content

Commit acbcff0

Browse files
committed
Stop testing HTTP error statusCode properties.
1 parent c1527b6 commit acbcff0

File tree

5 files changed

+4
-7
lines changed

5 files changed

+4
-7
lines changed

changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
- ESM is no longer published, due to CJS/ESM compatibility issues across recent Node.js versions.
88
- The file structure and non-index file exports have changed. This should only affect projects using undocumented deep imports.
99

10+
### Patch
11+
12+
- Stop testing the `statusCode` property of HTTP errors; they are inconsequential as Koa uses the `status` property.
13+
1014
## 3.0.0
1115

1216
### Major

test/checkGraphQLSchema.test.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ module.exports = tests => {
3333
name: 'InternalServerError',
3434
message: 'Test GraphQL schema must be a `GraphQLSchema` instance.',
3535
status: 500,
36-
statusCode: 500,
3736
expose: false
3837
})
3938
})
@@ -45,7 +44,6 @@ module.exports = tests => {
4544
name: 'InternalServerError',
4645
message: 'Test has GraphQL schema validation errors.',
4746
status: 500,
48-
statusCode: 500,
4947
expose: false,
5048
graphqlErrors: [new GraphQLError('Query root type must be provided.')]
5149
})

test/checkGraphQLValidationRules.test.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ module.exports = tests => {
1717
name: 'InternalServerError',
1818
message: 'Test GraphQL validation rules must be an array.',
1919
status: 500,
20-
statusCode: 500,
2120
expose: false
2221
})
2322
})
@@ -27,7 +26,6 @@ module.exports = tests => {
2726
name: 'InternalServerError',
2827
message: 'Test GraphQL validation rules must be functions.',
2928
status: 500,
30-
statusCode: 500,
3129
expose: false
3230
})
3331
})

test/checkOptions.test.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ module.exports = tests => {
1212
throws(() => checkOptions(null, ['a'], 'Test'), {
1313
message: 'Test options must be an enumerable object.',
1414
status: 500,
15-
statusCode: 500,
1615
expose: false
1716
})
1817
})
@@ -21,7 +20,6 @@ module.exports = tests => {
2120
throws(() => checkOptions({ a: true, b: true, c: true }, ['b'], 'Test'), {
2221
message: 'Test options invalid: `a`, `c`.',
2322
status: 500,
24-
statusCode: 500,
2523
expose: false
2624
})
2725
})

test/execute.test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,6 @@ module.exports = tests => {
664664
message:
665665
'GraphQL execute middleware `schema` option has GraphQL schema validation errors.',
666666
status: 500,
667-
statusCode: 500,
668667
expose: false,
669668
graphqlErrors: [new GraphQLError('Query root type must be provided.')]
670669
})

0 commit comments

Comments
 (0)