function stub_all([contentType, globs]) {
  function stub(request) {
    request.on('before:response', response => {
      assign(response.headers, {
        ['content-type']: contentType,
        ['cache-control']: 'no-store',
      });
      response.body = '';
    });
  }

  for (const url of globs) {
    cy.intercept({
      url,
      middleware: true,
    }, stub);
  }
}
/**
 * Stub all matched URLs for a particular MIME type.
 * @param {Array} parameter
 */
Stub all matched URLs for a particular MIME type.
@param {Array} parameter
Stub all matched URLs for a particular MIME type . @param { Array } parameter
function stub_all([contentType, globs]) {
  function stub(request) {
    request.on('before:response', response => {
      assign(response.headers, {
        ['content-type']: contentType,
        ['cache-control']: 'no-store',
      });
      response.body = '';
    });
  }
  for (const url of globs) {
    cy.intercept({
      url,
      middleware: true,
    }, stub);
  }
}
function stub_all ( [ contentType , globs ] ) { function stub ( request ) { request . on ( 'before:response' , response => { assign ( response . headers , { [ 'content-type' ] : contentType , [ 'cache-control' ] : 'no-store' , } ) ; response . body = '' ; } ) ; } for ( const url of globs ) { cy . intercept ( { url , middleware : true , } , stub ) ; } }
Stub all matched URLs for a particular MIME type.
Stub all matched URLs for a particular MIME type .