Add test for select option with empty string value

This commit is contained in:
spacejack 2017-04-26 20:07:25 -04:00
parent e26e1f10c0
commit f8ccd418d3

View file

@ -80,6 +80,16 @@ o.spec("form inputs", function() {
o(select.dom.selectedIndex).equals(0)
})
o("select option can have empty string value", function() {
var select = {tag: "select", children :[
{tag: "option", attrs: {value: ""}, text: "aaa"}
]}
render(root, [select])
o(select.dom.firstChild.value).equals("")
})
o("select yields invalid value without children", function() {
var select = {tag: "select", attrs: {value: "a"}}