fix: selector [value=""] is mishandled (#1843)

This commit is contained in:
Scotty Simpson 2017-05-02 14:28:59 -07:00 committed by Pat Cavit
parent af3da16832
commit 73d9265c6d
2 changed files with 13 additions and 1 deletions

View file

@ -218,6 +218,18 @@ o.spec("hyperscript", function() {
o(vnode.tag).equals("div")
o(vnode.attrs.a).equals(true)
})
o("handles explicit empty string value for input", function() {
var vnode = m('input[value=""]')
o(vnode.tag).equals("input")
o(vnode.attrs.value).equals("")
})
o("handles explicit empty string value for option", function() {
var vnode = m('option[value=""]')
o(vnode.tag).equals("option")
o(vnode.attrs.value).equals("")
})
})
o.spec("attrs", function() {
o("handles string attr", function() {