Commit graph

1509 commits

Author SHA1 Message Date
Pierre-Yves Gerardy
4aaee178bc Fix the test of the old suite leave the new one broken 2016-09-11 17:10:34 +02:00
Pierre-Yves Gerardy
ee8ab3561b Break a test of the new suite 2016-09-11 17:00:06 +02:00
Pierre-Yves Gerardy
863b82b71a Break a test of the old suite 2016-09-11 16:52:54 +02:00
Pierre-Yves Gerardy
aeb5f05706 Add the old test suite to the grunt task for both local tests and CI
This relies on a hack to bypass the `mocha` detection by `grunt-mocha-phantomjs`.
The tests have to run in less than 10 seconds, which is unlikely to be problematic on current
hardware.

Alternatively, adding the following to tests/index.html also makes the old test suite compatible
with the mocha runner, but it entails loading `mocha`:

    <script src="../node_modules/mocha/mocha.js"></script>
    <script>
        mocha.setup("bdd")
        describe("dummy test", function(){
            it("is a dummy test to run the old test suite with grunt-mocha-phantomjs like the new one", function(){})
        })
        mocha.run()
    </script>
2016-09-11 16:21:45 +02:00
Leo Horie
6ab9570474 Merge pull request #1306 from pygy/next-single-error-message
[next] Use identical error messages, improve gzipped size
2016-09-09 13:07:22 -04:00
Pierre-Yves Gerardy
e55284fba2 Use identical error messages, improve gzipped size 2016-09-09 17:46:11 +02:00
Leo Horie
0159cd667a Merge pull request #1253 from pygy/fix-1252
Fix #1252, re-fix #348
2016-08-17 22:17:44 -04:00
Pierre-Yves Gerardy
51bfd511d2 Fix #1252, re-fix #348 2016-08-18 01:20:13 +02:00
Leo Horie
b0c246e2b4 Merge pull request #1236 from jsguy/next
Set dependencies when no window for isomorphic compatibility
2016-08-12 22:03:46 -04:00
jsguy
c6d57c7f53 Set dependencies when no window for isomorphic compatibility 2016-08-13 11:07:21 +10:00
Leo Horie
6fe960ee8a Merge pull request #1071 from husio/toJSON
JSON.stringify(m.prop(x)) use x.toJSON method when possible
2016-08-12 00:45:27 -04:00
Leo Horie
86cec02af9 Merge pull request #1227 from yaruson/issue-1195
Fix broken tests
2016-08-08 13:19:46 -04:00
Nikolay Kim
6d4d0f104f Fix broken tests 2016-08-06 20:35:46 +03:00
Leo Horie
f213db37b2 Merge pull request #1226 from yaruson/issue-1195
IE8 compatibility fixes
2016-08-06 09:58:23 -04:00
Nikolay Kim
505bd1337a IE8 compatibility fixes 2016-08-06 11:00:09 +03:00
Isiah Meadows
f71ff4963f Merge pull request #1203 from leiyangyou/onunload.old
fix potential overwriting of onunload.$old
2016-08-03 18:38:58 -04:00
Lei Yang
cde0e348a4 fix potential overwriting of onunload.$old 2016-08-03 19:31:36 +08:00
Isiah Meadows
72b6c1e68d Merge pull request #1159 from kronion/issue-956-fix-m.trust-offsets
Patch for #956: redraw trusted content with multiple nodes
2016-07-23 08:47:35 -04:00
Leo Horie
8c23b925b5 Merge pull request #1162 from pygy/factory
Resore m.factory
2016-07-18 14:28:59 -04:00
Pierre-Yves Gerardy
b000781555 Resore m.factory 2016-07-18 20:13:17 +02:00
Leo Horie
1ac540cf80 Merge pull request #1160 from kronion/editorconfig-specify-tab-width
Specify tab width in editorconfig
2016-07-18 09:43:32 -04:00
Collin Stedman
4616f2bab0 Specify tab width in editorconfig 2016-07-18 09:31:04 -04:00
Collin Stedman
62ae1e8b48 Patch for #956: redraw trusted content with multiple nodes 2016-07-18 01:28:48 -04:00
Leo Horie
0039a0b4a5 Merge pull request #1144 from ludbek/proper.component
proper component check at m()
2016-07-11 15:52:52 -04:00
ludbek
e46f8d5881 fixed syntax error 2016-07-11 20:56:39 +05:45
ludbek
cb64be965b removed stupid test 2016-07-11 20:34:03 +05:45
ludbek
8d14e811f9 proper component check at m() 2016-07-11 10:55:30 +05:45
Isiah Meadows
03c6188989 Merge pull request #1137 from nurtom/patch-1
Tests for issue #1124/#1125
2016-07-06 18:55:23 -04:00
Thomas Erfurth
3a9a271765 Merge remote-tracking branch 'origin/patch-1' into patch-1
# Conflicts:
#	mithril.js
2016-07-06 16:05:40 +02:00
Thomas Erfurth
d6f7653e31 Added tests for history modification when switching routes with parameters (#1125) 2016-07-06 16:00:39 +02:00
darda
c17ea5bbc8 Push route to history stack, when using parameters
Bugfix for issue #1124
The condition has been changed, which is deciding to push the a route to history stack.
I think, it is necessary to compare the old route with the current route, instead of old route with root (without parameters).
2016-07-06 16:00:39 +02:00
Thomas Erfurth
d327c92f0a Added tests for history modification when switching routes with parameters (#1125) 2016-07-06 10:54:46 +02:00
Leo Horie
b848655d8b Merge pull request #1131 from 2is10/route
Fixing m.route() after a canceled navigation (#1126)
2016-06-30 08:32:16 -04:00
Jared Jacobs
e9e2a45caa Fixing m.route() after a canceled navigation (#1126) 2016-06-29 22:48:45 -07:00
Leo Horie
2173d8c0e3 Merge pull request #1129 from 2is10/contributing
Updating the links to known failing tests (now just one)
2016-06-29 18:45:18 -04:00
Jared Jacobs
d59341ed06 Updating the links to known failing tests (now just one) 2016-06-29 15:34:41 -07:00
darda
753944efe8 Push route to history stack, when using parameters
Bugfix for issue #1124
The condition has been changed, which is deciding to push the a route to history stack.
I think, it is necessary to compare the old route with the current route, instead of old route with root (without parameters).
2016-06-23 08:49:18 +02:00
Leo Horie
015f127563 Merge pull request #1119 from futurist/next
FIX: ES3 props keyword bug in IE8; eslint errors
2016-06-20 09:50:10 -04:00
1111hui
2c3d3e5df0 cleanup and apply editorconfig 2016-06-20 16:15:59 +08:00
1111hui
8550501fb2 FIX: ES3 props keyword bug in IE8; eslint errors 2016-06-20 15:41:50 +08:00
Isiah Meadows
0294293f82 Merge pull request #1117 from epidemian/remove-peristent-unloaders
Remove unloaders when root element is removed
2016-06-18 15:35:18 -04:00
Demian Ferreiro
3e51c8c2ff Remove unloaders when root element is removed
When a controller calls preventDefault on its onunload method, it prevents the current root element from being unmounted via a route change. But it does not prevent it from being unmounted via m.mount(root, null). In that case, the root element is unmounted, but any unloaders that it had keep hanging on the `unloaders` array, and that prevented any future m.mount(root, component) calls from succeeding. This is what was happening on the pending route() tests.

The fix is pretty simple: just reset the `unloaders` array when removing the root element, just like it's done when no unloader calls preventDefault.

Also, 2 of the 4 pending tests were removed because they were identical to the other 2.
2016-06-18 07:41:49 -03:00
Pat Cavit
73dbc149b5 Merge pull request #1111 from djtango/patch-1
Update mithril.md
2016-06-17 09:10:12 -07:00
Deon Tan
6ffeeaa19d Update mithril.md
Should component be MyComponent?
2016-06-17 16:13:02 +01:00
Isiah Meadows
5cff2945b2 Merge pull request #1110 from isiahmeadows/next
Add definition file to npm
2016-06-17 06:14:55 -04:00
impinball
cb10456bbe Add definition file to npm [ci skip] 2016-06-17 06:09:04 -04:00
Leo Horie
c55917d21a Merge pull request #1106 from epidemian/fix-1091
Fix #1091 Value on select tag not set when options are changed
2016-06-13 11:13:32 -04:00
Demian Ferreiro
f3dd4fce7d Fix #1091 set correct select value when options change
Always consider the edge case of setting a <select> value when building an object. When a <select> node is reused, its option children can change, so its value attribute has to be re-assigned after its children have been recreated/updated.
2016-06-13 03:55:57 -03:00
Demian Ferreiro
1b36f2b720 Add test for select value render edge case 2016-06-13 02:38:51 -03:00
Leo Horie
8faab54c4c Merge pull request #1103 from brlewis/next
Render booleans as empty strings
2016-06-10 15:26:33 -04:00