es6/test/api-data-execute-nock.js
/**
 * Creates a nock that represents a successful call to data query endpoint.
 */
Creates a nock that represents a successful call to data query endpoint.
Creates a nock that represents a successful call to data query endpoint .
function executeSuccess(options) {
  const {
    url, path, auth, response = EXECUTE_SUCCESS_RESPONSE,
  } = options
  const scope = nock(url)
    .matchHeader('Accept', CONTENT_TYPE_APPLICATION_JSON)
    .matchHeader('Content-Type', CONTENT_TYPE_APPLICATION_JSON)
    .post(path)
  if (auth) {
    scope.basicAuth(auth)
  }
  return scope.reply(200, response)
}
function executeSuccess ( options ) { const { url , path , auth , response = EXECUTE_SUCCESS_RESPONSE , } = options const scope = nock ( url ) . matchHeader ( 'Accept' , CONTENT_TYPE_APPLICATION_JSON ) . matchHeader ( 'Content-Type' , CONTENT_TYPE_APPLICATION_JSON ) . post ( path ) if ( auth ) { scope . basicAuth ( auth ) } return scope . reply ( 200 , response ) }
Creates a nock that represents a successful call to data query endpoint.
Creates a nock that represents a successful call to data query endpoint .