test for correct this on m.withAttr callback
This commit is contained in:
parent
72c039c4dc
commit
352d093d90
1 changed files with 7 additions and 0 deletions
|
|
@ -1380,6 +1380,13 @@ function testMithril(mock) {
|
|||
handler({currentTarget: {test: "foo"}})
|
||||
return value === "foo"
|
||||
})
|
||||
test(function() {
|
||||
var value
|
||||
var _this
|
||||
var handler = m.withAttr("test", function(data) {value = data}, _this)
|
||||
handler({currentTarget: {test: "foo"}})
|
||||
return value === "foo" && handler.this === _this
|
||||
})
|
||||
|
||||
//m.trust
|
||||
test(function() {return m.trust("test").valueOf() === "test"})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue