mithril-vndb/test-utils
Isiah Meadows 794e8e963f
Bring some sanity to request parsing and error handling (#2335)
* Update docs/request.md
* Bring some sanity to request parsing and error handling

- The browser can do JSON parsing itself. Let's defer to that where
  possible. (A few IE hacks are required here, though.)
- Don't propagate any error that occurs before `deserialize`/`extract`.
- Allow sending raw array buffers/blobs/etc. to `deserialize`.
- Align behavior more closely with the XHR spec.
- Send the more useful parsed response to `deserialize`, not the less
  useful string response.
2019-05-29 09:41:22 -04:00
..
tests Officially drop IE9-10 support, pull out our hacks (#2296) 2018-11-27 18:04:15 -05:00
browserMock.js The browserMock $window must be reachable from the pushStateMock 2016-12-07 17:07:37 +01:00
callAsync.js fix event removal in diff 2016-08-12 22:08:02 -04:00
components.js Chore: Fix lint issues and add indent with tabs 2017-03-11 15:54:41 -06:00
domMock.js Officially drop IE9-10 support, pull out our hacks (#2296) 2018-11-27 18:04:15 -05:00
parseURL.js "use strict" and other linty fixes 2017-03-03 18:24:38 -05:00
pushStateMock.js feat: perf testing (#1789) 2017-04-13 09:48:30 -07:00
README.md Add editorconfig, resolve differences 2016-06-18 03:22:12 -04:00
throttleMock.js Lint 2017-06-14 00:15:08 +02:00
xhrMock.js Bring some sanity to request parsing and error handling (#2335) 2019-05-29 09:41:22 -04:00

Test utils

Utilities for testing Mithril

Version: 1.0 License: MIT

About

  • pushStateMock - mock for history.pushState and location
  • ajaxMock - mock for XMLHttpRequest and JSONP transporters
  • parseURL - helper function for URL parsing