Allow m.prop to be JSON.stringify-ed
This commit is contained in:
parent
d7b64ceab2
commit
95affb1cb2
2 changed files with 13 additions and 1 deletions
|
|
@ -389,6 +389,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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue