Commit graph

44 commits

Author SHA1 Message Date
Leo Horie
3134202d24 fix tests 2016-12-06 00:09:09 -05:00
Leo Horie
809d8921c9 bypass route resolution algorithm on non-routed redraws 2016-12-05 11:23:25 -05:00
Leo Horie
bb4321e8db Merge remote-tracking branch 'origin/rewrite' into rewrite 2016-12-04 23:36:52 -05:00
Leo Horie
a2b45ff131 add integration test 2016-12-04 23:36:38 -05:00
Pierre-Yves Gerardy
58275417d4 Add test for the context of onmatch and render 2016-12-04 23:49:33 +01:00
Pierre-Yves Gerardy
b6c8e2c63e Add an assertion for RouteResolver.render calls on route.set(route.get()) 2016-12-04 23:38:01 +01:00
Leo Horie
2ffd2fb7e4 throttle m.route redraws 2016-12-04 01:53:39 -05:00
Leo Horie
7368cf6f26 spacing 2016-12-03 09:09:37 -05:00
Leo Horie
713c25c9c0 fix #1404 2016-12-01 01:45:07 -05:00
1111hui
49d678e9a2 double test timeout for test pass in old machine 2016-10-10 16:41:57 +08:00
Leo Horie
cffe77b2c2 tweak timeout in some api/router tests 2016-10-04 16:43:31 -04:00
Pierre-Yves Gerardy
118da88889 Add test for keys on routed components 2016-09-17 22:43:38 +02:00
Pierre-Yves Gerardy
b8673f2ff5 Validate the DOM node passed to render 2016-09-09 15:20:26 +02:00
Pierre-Yves Gerardy
879b9d6883 Adapt tests for debouncedAsync. 2016-09-02 23:05:34 +02:00
Pierre-Yves Gerardy
a34685d7a4 m.route.get() returns the last fully resolved route (fix #1276), change RouteResolver.onmatch() signature according to #1277 2016-09-02 22:03:27 +02:00
Pierre-Yves Gerardy
419897f72c Add test for #1276 2016-09-02 22:00:59 +02:00
Pierre-Yves Gerardy
09578197a1 Mount-based api/router.js
Fix #1180
Fix #1268
Fix #1275
Fix #1286
2016-09-02 21:59:05 +02:00
Pierre-Yves Gerardy
2e3a610a78 Tests for the bugs fixed by the mount-based router 2016-09-02 21:56:58 +02:00
Pierre-Yves Gerardy
f9b358331e White space cleanup 2016-09-01 20:17:05 +02:00
Leo Horie
00d555b9f4 prevent race condition between route.set and async resolve
remove path and route from attrs
2016-08-26 00:56:01 -04:00
Leo Horie
ec07d76fcd m.fragment docs
public api tests
2016-08-24 00:26:15 -04:00
Leo Horie
53a83a58f2 rename RouteResolver::view back to render to restore diff semantics
prevent double resolving
2016-08-23 22:33:18 -04:00
Leo Horie
80c25e3809 rename routeresolver methods to {onmatch,view}
expose some piecemeal modules
rename internal xhr to request
mirror internal stream api to match public api
2016-08-17 00:10:47 -04:00
Leo Horie
68331065b7 more router tests 2016-08-12 23:56:17 -04:00
Leo Horie
8ec3a3f2c5 test router using file protocol as start point 2016-08-02 23:21:13 -04:00
Leo Horie
084d99f125 fix back button on default route trigger 2016-07-15 01:22:34 -04:00
Leo Horie
a6c56ff6b9 resolve hook in router 2016-07-11 09:50:00 -04:00
Leo Horie
e8e0bae726 make setPath always async 2016-07-01 13:03:07 -04:00
impinball
b4fb21475c Add editorconfig, resolve differences
This includes newlines, tabs, among other things.
2016-06-18 03:22:12 -04:00
Leo Horie
9b602edf4e create only one renderer 2016-05-21 00:59:33 -04:00
Leo Horie
0005cf26ee refactor redraw into pubsub and autoredraw
- pubsub is a basic pubsub impl
- autoredraw is glue code to register callback to pubsub and onevent

moved e.redraw to autoredraw
2016-05-21 00:37:34 -04:00
Leo Horie
4e65357242 node doesn't like floating point numbers as setTimeout arg 2016-05-20 22:55:21 -04:00
Leo Horie
b1e8f61c87 fix tests after merge conflict 2016-05-20 22:50:52 -04:00
Leo Horie
acd9d5b641 Merge branch 'bundler-fix' into rewrite
Conflicts:
	api/mount.js
	api/router.js
	api/tests/test-router.js
	index.js
2016-05-20 22:45:51 -04:00
Leo Horie
e5391a1957 bundler variable disambiguation 2016-05-20 22:38:10 -04:00
Pat Cavit
71c77ba603 Add m.redraw() support for multiple mount points
To better match `0.2.x` behavior: https://jsfiddle.net/xbpyqL9k/
2016-05-20 15:27:17 -07:00
Pat Cavit
04eaa25ab1 Support for skipping redraws (#1049)
Mostly useful for event handlers, setting `e.redraw = false` will prevent mithril from re-rendering.
2016-05-20 11:50:41 -07:00
Leo Horie
977239d207 rename limiter to throttle and refactor
- don't inject raf/setTimeout since we can't really mock them w/ a good degree of timing accuracy anyways

fix some unrelated tests
2016-05-19 23:24:04 -04:00
Pat Cavit
9f1afea9e1 Match @lhorie style
I don't usually write JS w/o semicolons, so no surprise I got this wrong
at first.
2016-05-19 11:53:41 -07:00
Pat Cavit
36bfc6892b Fix var shadowing infinite loop bug in browsers 2016-05-19 11:52:14 -07:00
Pat Cavit
749ff74bea Test both async types when using router 2016-05-19 11:35:45 -07:00
Pat Cavit
282cc5afdd Fix m.route() tests
- Wasn't calling route.prefix(), was assigning to it
- Needed to handle pushstate prefix (`""`) specially in assertions
2016-05-19 10:59:41 -07:00
Pat Cavit
41b24b998a m.route tests should run against all prefixes
Also tests `router.link` now. Had to add a `preventDefault` function to
domMock events that doesn't do anything, that may need a more-complete
implementation someday?
2016-05-19 10:59:41 -07:00
Pat Cavit
ce42adb720 Basic router tests 2016-05-19 10:59:41 -07:00