mithril-vndb/test-utils
Pierre-Yves Gérardy 60e8f307f1 Fix state initialization (#1652)
* Add test-utils/components.js and its tests

* Tests: group together tests with/without components

* Tests: factory => closure components

* Tests: add dummy forEach blocks around sections with components

* Tests: render/test-components tweaks

* Tests: Wrap some component definitions in `createComponent()` calls

These are the ones that would have been tedious to automate.
jscodeshift will handle the remaining ones

* Tests: wrap the rest of the components definitions

* Tests: enable the three kind of components in all related files but api/tests/test-route.js

* Add test-utils/components.js to index.html where needed

* Tests: Some more render/tests/test-component.js refactoring

* Tests: enable tests for #1638

* fix #1638

* Test: ensure that recycled components get a fresh state

* Tests: add a test for onbeforeupdate and recycled nodes

* Fix recycled components initialization
fix #1641
2017-02-25 15:53:51 -05:00
..
tests Fix state initialization (#1652) 2017-02-25 15:53:51 -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 Fix state initialization (#1652) 2017-02-25 15:53:51 -05:00
domMock.js allow dom level 1 events to be removed #1385 2016-11-04 12:33:36 -04:00
parseURL.js initial commit (work in progress) 2016-04-20 20:02:37 -04:00
pushStateMock.js add support for route state #1480 2016-12-17 21:50:04 -05:00
README.md Add editorconfig, resolve differences 2016-06-18 03:22:12 -04:00
xhrMock.js Add tests for abort functionality. 2017-02-12 16:38:45 +11: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