more tests
This commit is contained in:
parent
a2c01d1d96
commit
e7420e72e1
14 changed files with 596 additions and 215 deletions
|
|
@ -14,6 +14,19 @@ o.spec("withAttr", function() {
|
|||
o(spy.args).deepEquals([1])
|
||||
o(spy.this).equals(context)
|
||||
})
|
||||
o("works with attribute", function() {
|
||||
var target = {
|
||||
getAttribute: function() {return "readonly"}
|
||||
}
|
||||
var spy = o.spy()
|
||||
var context = {
|
||||
handler: withAttr("readonly", spy)
|
||||
}
|
||||
context.handler({currentTarget: target})
|
||||
|
||||
o(spy.args).deepEquals(["readonly"])
|
||||
o(spy.this).equals(context)
|
||||
})
|
||||
o("context arg works", function() {
|
||||
var spy = o.spy()
|
||||
var context = {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue