Allow xlink:href to get removed, fix option.value in mock
This commit is contained in:
parent
e36a8db9d4
commit
348bed0a7e
6 changed files with 30 additions and 11 deletions
|
|
@ -445,7 +445,7 @@ module.exports = function(options) {
|
|||
if (element.nodeName === "OPTION") {
|
||||
var valueSetter = spy(function(value) {
|
||||
/*eslint-disable no-implicit-coercion*/
|
||||
this.setAttribute("value", value === null ? "" : "" + value)
|
||||
this.setAttribute("value", "" + value)
|
||||
/*eslint-enable no-implicit-coercion*/
|
||||
})
|
||||
Object.defineProperty(element, "value", {
|
||||
|
|
|
|||
|
|
@ -954,11 +954,11 @@ o.spec("domMock", function() {
|
|||
o(select.selectedIndex).equals(1)
|
||||
}
|
||||
})
|
||||
o("option.value = null is converted to the empty string", function() {
|
||||
o("option.value = null is converted to 'null'", function() {
|
||||
var option = $document.createElement("option")
|
||||
option.value = null
|
||||
|
||||
o(option.value).equals("")
|
||||
o(option.value).equals("null")
|
||||
})
|
||||
o("setting valid value works with optgroup", function() {
|
||||
var select = $document.createElement("select")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue