Merge pull request #54 from thatsmydoing/master

Allow m.prop to be JSON.stringify-ed
This commit is contained in:
Leo Horie 2014-04-19 18:20:29 -04:00
commit 8b6c2c381a
2 changed files with 13 additions and 1 deletions

View file

@ -419,6 +419,14 @@ function testMithril(mock) {
prop("foo")
return prop() == "foo"
})
test(function() {
var prop = m.prop("test")
return JSON.stringify(prop) == "\"test\""
})
test(function() {
var obj = { prop: m.prop("test") }
return JSON.stringify(obj) == "{\"prop\":\"test\"}"
})
//m.request
test(function() {