@@ -35,7 +35,9 @@ func tinit(t *testing.T) graphql.Schema {
35
35
func TestExtensionInitPanic (t * testing.T ) {
36
36
ext := newtestExt ("testExt" )
37
37
ext .initFn = func (ctx context.Context , p * graphql.Params ) context.Context {
38
- panic (errors .New ("test error" ))
38
+ if true {
39
+ panic (errors .New ("test error" ))
40
+ }
39
41
return ctx
40
42
}
41
43
@@ -62,7 +64,9 @@ func TestExtensionInitPanic(t *testing.T) {
62
64
func TestExtensionParseDidStartPanic (t * testing.T ) {
63
65
ext := newtestExt ("testExt" )
64
66
ext .parseDidStartFn = func (ctx context.Context ) (context.Context , graphql.ParseFinishFunc ) {
65
- panic (errors .New ("test error" ))
67
+ if true {
68
+ panic (errors .New ("test error" ))
69
+ }
66
70
return ctx , func (err error ) {
67
71
68
72
}
@@ -119,7 +123,9 @@ func TestExtensionParseFinishFuncPanic(t *testing.T) {
119
123
func TestExtensionValidationDidStartPanic (t * testing.T ) {
120
124
ext := newtestExt ("testExt" )
121
125
ext .validationDidStartFn = func (ctx context.Context ) (context.Context , graphql.ValidationFinishFunc ) {
122
- panic (errors .New ("test error" ))
126
+ if true {
127
+ panic (errors .New ("test error" ))
128
+ }
123
129
return ctx , func ([]gqlerrors.FormattedError ) {
124
130
125
131
}
@@ -176,7 +182,9 @@ func TestExtensionValidationFinishFuncPanic(t *testing.T) {
176
182
func TestExtensionExecutionDidStartPanic (t * testing.T ) {
177
183
ext := newtestExt ("testExt" )
178
184
ext .executionDidStartFn = func (ctx context.Context ) (context.Context , graphql.ExecutionFinishFunc ) {
179
- panic (errors .New ("test error" ))
185
+ if true {
186
+ panic (errors .New ("test error" ))
187
+ }
180
188
return ctx , func (r * graphql.Result ) {
181
189
182
190
}
@@ -236,7 +244,9 @@ func TestExtensionExecutionFinishFuncPanic(t *testing.T) {
236
244
func TestExtensionResolveFieldDidStartPanic (t * testing.T ) {
237
245
ext := newtestExt ("testExt" )
238
246
ext .resolveFieldDidStartFn = func (ctx context.Context , i * graphql.ResolveInfo ) (context.Context , graphql.ResolveFieldFinishFunc ) {
239
- panic (errors .New ("test error" ))
247
+ if true {
248
+ panic (errors .New ("test error" ))
249
+ }
240
250
return ctx , func (v interface {}, err error ) {
241
251
242
252
}
@@ -299,7 +309,9 @@ func TestExtensionResolveFieldFinishFuncPanic(t *testing.T) {
299
309
func TestExtensionGetResultPanic (t * testing.T ) {
300
310
ext := newtestExt ("testExt" )
301
311
ext .getResultFn = func (context.Context ) interface {} {
302
- panic (errors .New ("test error" ))
312
+ if true {
313
+ panic (errors .New ("test error" ))
314
+ }
303
315
return nil
304
316
}
305
317
ext .hasResultFn = func () bool {
0 commit comments