mirror of
https://github.com/jquery/jquery.git
synced 2024-12-09 08:04:24 +00:00
Tests: Align middleware-mockerver.js
with the main
branch
Remove a redundant Express-targeted `resp.set` call from the `script` handler in `middleware-mockserver.js` as was done on the `main` branch. Closes gh-5413 Ref gh-5397
This commit is contained in:
parent
ba6ba5a4c1
commit
164c314f88
@ -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( {
|
||||
|
Loading…
Reference in New Issue
Block a user