From 9e5bd07235389d1ed4b8937f976de39e4399b4f6 Mon Sep 17 00:00:00 2001 From: Leo Horie Date: Thu, 29 May 2014 08:21:05 -0400 Subject: [PATCH] add test for m.sync pr --- docs/change-log.md | 1 + tests/mithril-tests.js | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/docs/change-log.md b/docs/change-log.md index 067263ae..b44f040d 100644 --- a/docs/change-log.md +++ b/docs/change-log.md @@ -5,6 +5,7 @@ ### Bug Fixes: - `m.sync` now correctly passes arguments to resolver in same order as input arguments [#96](https://github.com/lhorie/mithril.js/issues/96) +- fixed diff deletion bug [#99](https://github.com/lhorie/mithril.js/issues/99) - updating textarea attributes updates its value correctly [#100](https://github.com/lhorie/mithril.js/issues/100) --- diff --git a/tests/mithril-tests.js b/tests/mithril-tests.js index 777bf705..c3874ad8 100644 --- a/tests/mithril-tests.js +++ b/tests/mithril-tests.js @@ -893,6 +893,15 @@ function testMithril(mock) { deferred2.resolve("foo") return value[0] === "test" && value[1] === "foo" }) + test(function() { + var value + var deferred1 = m.deferred() + var deferred2 = m.deferred() + m.sync([deferred1.promise, deferred2.promise]).then(function(data) {value = data}) + deferred2.resolve("foo") + deferred1.resolve("test") + return value[0] === "test" && value[1] === "foo" + }) //m.startComputation/m.endComputation test(function() {