Skip to content

Releases: berniegp/mock-xmlhttprequest

v4.2.0

20 Mar 16:01
Compare
Choose a tag to compare

New features

  • Add support for removeEventListener()

Fixes

  • Fix addEventListener() not ignoring duplicate listeners

v4.1.0

15 Mar 16:00
Compare
Choose a tag to compare

New features

  • Add a MockXhr factory method to the mock server

v4.0.0

15 Mar 13:15
Compare
Choose a tag to compare

New features

  • Add support for the timeout attribute

Breaking changes

  • Setting the timeout attribute to a non-zero value will trigger timeout events by default

v3.3.0

14 Mar 12:57
Compare
Choose a tag to compare

New features

  • Add request headers and body to MockXhrServer.getRequestLog()

v3.2.1

11 Jan 08:11
Compare
Choose a tag to compare

Restore javascript strict mode

v3.2.0

10 Jan 10:42
Compare
Choose a tag to compare

New features

  • Add the mock server method setDefault404()

v3.1.0

10 Jan 10:30
Compare
Choose a tag to compare

Fix documentation internal links

v3.0.0

10 Jan 10:19
Compare
Choose a tag to compare

New features

  • Add the mock server feature for easier mocking of requests
  • Validate changes to the XMLHttpRequest spec up to version "28 November 2018"
  • Convert code to ES2015

Breaking changes

  • The object returned by require('mock-xmlhttprequest ') is no longer the MockXhr class. It can now be accessed by require('mock-xmlhttprequest').MockXhr.
  • Node.js 4 support dropped (for ES2015)

v2.0.0

15 Jun 17:14
Compare
Choose a tag to compare

New features

  • Add setRequestTimeout() mock method
  • Implement changes to the XMLHttpRequest spec up to version "15 June 2018"
    • Align header handling with Fetch
    • Account for loadstart being able to change state
    • Reset response for abort() during DONE

Fixes

  • Respect the upload listener flag
  • Sort and combine headers in getAllResponseHeaders()

v1.2.0

15 Jun 17:10
Compare
Choose a tag to compare

Add MockXMLHttpRequest.newMockXhr() for better test isolation