tests for validating #1595 and #1804

This commit is contained in:
Pierre-Yves Gerardy 2017-05-28 18:24:12 +02:00
parent e031fe49a1
commit 58bc414635
2 changed files with 386 additions and 0 deletions

View file

@ -30,6 +30,7 @@ module.exports = function(options) {
}
}
function getSpies(element) {
if (element == null || typeof element !== "object") throw new Error("Element expected")
if(options.spy) return spymap[spymap.indexOf(element) + 1]
}
@ -314,6 +315,7 @@ module.exports = function(options) {
enumerable: true,
})
// we currently emulate the non-ie behavior, but emulating ie may be more useful (throw when an invalid type is set)
var typeSetter = spy(function(v) {
this.setAttribute("type", v)
})