diff --git a/test/middleware-mockserver.js b/test/middleware-mockserver.js index 9dcf51951..c1fb813e0 100644 --- a/test/middleware-mockserver.js +++ b/test/middleware-mockserver.js @@ -79,13 +79,7 @@ const mocks = { headers[ "access-control-allow-origin" ] = "*"; } - if ( resp.set ) { - resp.set( headers ); - } else { - for ( const key in headers ) { - resp.writeHead( 200, { [ key ]: headers[ key ] } ); - } - } + resp.writeHead( 200, headers ); if ( req.query.callback ) { resp.end( `${ cleanCallback( req.query.callback ) }(${ JSON.stringify( {