File tree 2 files changed +4
-7
lines changed
2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -186,16 +186,13 @@ const ashnazgHookUrls = [
186
186
] ;
187
187
188
188
function validateAshHooks ( hooks ) {
189
- // Note: unlike `reportError` used above, here empty object literals are
190
- // pushed instead of nulls. This is simply to match the original structure
191
- // of report.json. TODO: change this to null, or add error details.
192
189
const errors = [ ] ;
193
190
const ashHooks = hooks . filter ( h => ashnazgHookUrls . includes ( h . config . url ) && h . config . contentType === "json" && h . config . insecureSsl === "0" && h . config . secret !== "" ) ;
194
191
if ( ashHooks . length === 0 ) {
195
- errors . push ( [ 'missingashnazghook' , { } ] ) ;
192
+ errors . push ( [ 'missingashnazghook' , null ] ) ;
196
193
}
197
194
if ( ashHooks . length > 1 ) {
198
- errors . push ( [ 'duplicateashnazghooks' , { } ] ) ;
195
+ errors . push ( [ 'duplicateashnazghooks' , null ] ) ;
199
196
}
200
197
return errors ;
201
198
}
Original file line number Diff line number Diff line change @@ -411,7 +411,7 @@ describe('validateAshHooks', () => {
411
411
it ( 'no hooks' , ( ) => {
412
412
const hooks = [ ] ;
413
413
const errors = validateAshHooks ( hooks ) ;
414
- assert . deepStrictEqual ( errors , [ [ 'missingashnazghook' , { } ] ] ) ;
414
+ assert . deepStrictEqual ( errors , [ [ 'missingashnazghook' , null ] ] ) ;
415
415
} ) ;
416
416
417
417
it ( 'one hook' , ( ) => {
@@ -444,6 +444,6 @@ describe('validateAshHooks', () => {
444
444
}
445
445
} ] ;
446
446
const errors = validateAshHooks ( hooks ) ;
447
- assert . deepStrictEqual ( errors , [ [ 'duplicateashnazghooks' , { } ] ] ) ;
447
+ assert . deepStrictEqual ( errors , [ [ 'duplicateashnazghooks' , null ] ] ) ;
448
448
} ) ;
449
449
} ) ;
You can’t perform that action at this time.
0 commit comments