make getter-setters json-serializable
This commit is contained in:
parent
0aba8aa4bd
commit
cb6994dd93
9 changed files with 49 additions and 14 deletions
|
|
@ -417,15 +417,15 @@ function testMithril(mock) {
|
|||
test(function() {
|
||||
var prop = m.prop("test")
|
||||
prop("foo")
|
||||
return prop() == "foo"
|
||||
return prop() === "foo"
|
||||
})
|
||||
test(function() {
|
||||
var prop = m.prop("test")
|
||||
return JSON.stringify(prop) == "\"test\""
|
||||
return JSON.stringify(prop) === '"test"'
|
||||
})
|
||||
test(function() {
|
||||
var obj = { prop: m.prop("test") }
|
||||
return JSON.stringify(obj) == "{\"prop\":\"test\"}"
|
||||
var obj = {prop: m.prop("test")}
|
||||
return JSON.stringify(obj) === '{"prop":"test"}'
|
||||
})
|
||||
|
||||
//m.request
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue