How to use the fake-xml-http-request.OPENED function in fake-xml-http-request

To help you get started, we’ve selected a few fake-xml-http-request examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github folio-org / stripes-core / test / bigtest / network / patch-fake-xml-http-request.js View on Github external
FakeXMLHttpRequest.prototype.open = function(method, url, async, username, password) {
  this.method = method;
  this.url = url;
  this.async = typeof async == "boolean" ? async : true;
  this.username = username;
  this.password = password;
  this.responseText = null;
  this.responseXML = null;
  this.responseURL = url;
  this.requestHeaders = {};
  this.sendFlag = false;
  delete this.response;
  this._readyStateChange(FakeXMLHttpRequest.OPENED);
}

fake-xml-http-request

test infrastructure for a fake XMLHttpRequest object

MIT
Latest version published 3 years ago

Package Health Score

59 / 100
Full package analysis

Similar packages