Fix lint errors
This commit is contained in:
parent
9999fbe2a4
commit
0f9274f873
7 changed files with 47 additions and 47 deletions
|
|
@ -175,7 +175,7 @@ o.spec("form inputs", function() {
|
|||
o.spec("select", function() {
|
||||
o("select works without attributes", function() {
|
||||
var select = m("select",
|
||||
m("option", {value: "a"}, "aaa"),
|
||||
m("option", {value: "a"}, "aaa")
|
||||
)
|
||||
|
||||
render(root, select)
|
||||
|
|
@ -248,7 +248,7 @@ o.spec("form inputs", function() {
|
|||
var select = m("select", {value: "b"},
|
||||
m("option", {value: "a"}, "aaa"),
|
||||
m("option", {value: "b"}, "bbb"),
|
||||
m("option", {value: "c"}, "ccc"),
|
||||
m("option", {value: "c"}, "ccc")
|
||||
)
|
||||
|
||||
render(root, select)
|
||||
|
|
@ -262,7 +262,7 @@ o.spec("form inputs", function() {
|
|||
return m("select", {value: "b"},
|
||||
m("option", {value: "a"}, "aaa"),
|
||||
m("option", {value: "b"}, "bbb"),
|
||||
m("option", {value: "c"}, "ccc"),
|
||||
m("option", {value: "c"}, "ccc")
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -305,17 +305,17 @@ o.spec("onbeforeupdate", function() {
|
|||
render(root,
|
||||
m("div", {onbeforeupdate: function() { return true }},
|
||||
m("div")
|
||||
),
|
||||
)
|
||||
)
|
||||
render(root,
|
||||
m("div", {onbeforeupdate: function() { return false }},
|
||||
m("div", m("div"))
|
||||
),
|
||||
)
|
||||
)
|
||||
render(root,
|
||||
m("div", {onbeforeupdate: function() { return true }},
|
||||
m("div", m("div"))
|
||||
),
|
||||
)
|
||||
)
|
||||
o(root.firstChild.firstChild.childNodes.length).equals(1)
|
||||
})
|
||||
|
|
@ -323,17 +323,17 @@ o.spec("onbeforeupdate", function() {
|
|||
render(root,
|
||||
m("div", {onbeforeupdate: function() { return true }},
|
||||
m("div")
|
||||
),
|
||||
)
|
||||
)
|
||||
render(root,
|
||||
m("div", {onbeforeupdate: function() { return false }},
|
||||
m("div", "foo")
|
||||
),
|
||||
)
|
||||
)
|
||||
render(root,
|
||||
m("div", {onbeforeupdate: function() { return true }},
|
||||
m("div", "foo")
|
||||
),
|
||||
)
|
||||
)
|
||||
o(root.firstChild.firstChild.firstChild.nodeValue).equals("foo")
|
||||
})
|
||||
|
|
@ -349,17 +349,17 @@ o.spec("onbeforeupdate", function() {
|
|||
render(root,
|
||||
m("div", {onbeforeupdate: function() { return true }},
|
||||
m(Child, {foo: false})
|
||||
),
|
||||
)
|
||||
)
|
||||
render(root,
|
||||
m("div", {onbeforeupdate: function() { return false }},
|
||||
m(Child, {foo: false})
|
||||
),
|
||||
)
|
||||
)
|
||||
render(root,
|
||||
m("div", {onbeforeupdate: function() { return true }},
|
||||
m(Child, {foo: true})
|
||||
),
|
||||
)
|
||||
)
|
||||
o(root.firstChild.firstChild.childNodes.length).equals(1)
|
||||
})
|
||||
|
|
@ -367,17 +367,17 @@ o.spec("onbeforeupdate", function() {
|
|||
render(root,
|
||||
m("div", {onbeforeupdate: function() { return true }},
|
||||
m("div")
|
||||
),
|
||||
)
|
||||
)
|
||||
render(root,
|
||||
m("div", {onbeforeupdate: function() { return false }},
|
||||
m("div")
|
||||
),
|
||||
)
|
||||
)
|
||||
render(root,
|
||||
m("div", {onbeforeupdate: function() { return true }},
|
||||
m("div", m("div"))
|
||||
),
|
||||
)
|
||||
)
|
||||
o(root.firstChild.firstChild.childNodes.length).equals(1)
|
||||
})
|
||||
|
|
|
|||
|
|
@ -238,9 +238,9 @@ o.spec("onremove", function() {
|
|||
return {then: function (r) { resolve = r }}
|
||||
},
|
||||
},
|
||||
m("div", id),
|
||||
m("div", id)
|
||||
)
|
||||
)
|
||||
),
|
||||
)
|
||||
)
|
||||
}
|
||||
|
|
@ -344,9 +344,9 @@ o.spec("onremove", function() {
|
|||
}}
|
||||
},
|
||||
},
|
||||
m("div", id),
|
||||
m("div", id)
|
||||
)
|
||||
)
|
||||
),
|
||||
)
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -218,13 +218,13 @@ o.spec("render", function() {
|
|||
var a = function() {
|
||||
return m("div", {key: 1},
|
||||
m("div", {key: 11, oncreate: createA, onupdate: updateA, onremove: removeA}),
|
||||
m("div", {key: 12}),
|
||||
m("div", {key: 12})
|
||||
)
|
||||
}
|
||||
var b = function() {
|
||||
return m("div", {key: 2},
|
||||
m("div", {key: 21, oncreate: createB, onupdate: updateB, onremove: removeB}),
|
||||
m("div", {key: 22}),
|
||||
m("div", {key: 22})
|
||||
)
|
||||
}
|
||||
render(root, a())
|
||||
|
|
@ -247,12 +247,12 @@ o.spec("render", function() {
|
|||
var removeB = o.spy()
|
||||
var a = function() {
|
||||
return m("div", {key: 1},
|
||||
m("div", {oncreate: createA, onupdate: updateA, onremove: removeA}),
|
||||
m("div", {oncreate: createA, onupdate: updateA, onremove: removeA})
|
||||
)
|
||||
}
|
||||
var b = function() {
|
||||
return m("div", {key: 2},
|
||||
m("div", {oncreate: createB, onupdate: updateB, onremove: removeB}),
|
||||
m("div", {oncreate: createB, onupdate: updateB, onremove: removeB})
|
||||
)
|
||||
}
|
||||
render(root, a())
|
||||
|
|
@ -276,12 +276,12 @@ o.spec("render", function() {
|
|||
|
||||
var a = function() {
|
||||
return m("div", {key: 1},
|
||||
m("div", {oncreate: createA, onupdate: updateA, onremove: removeA}),
|
||||
m("div", {oncreate: createA, onupdate: updateA, onremove: removeA})
|
||||
)
|
||||
}
|
||||
var b = function() {
|
||||
return m("div", {key: 2},
|
||||
m("div", {oncreate: createB, onupdate: updateB, onremove: removeB}),
|
||||
m("div", {oncreate: createB, onupdate: updateB, onremove: removeB})
|
||||
)
|
||||
}
|
||||
render(root, a())
|
||||
|
|
@ -306,7 +306,7 @@ o.spec("render", function() {
|
|||
// note that this only exerciese one branch of the keyed diff algo
|
||||
var svg = m("svg",
|
||||
m("g", {key: 0}),
|
||||
m("g", {key: 1}),
|
||||
m("g", {key: 1})
|
||||
)
|
||||
render(root, svg)
|
||||
|
||||
|
|
@ -316,7 +316,7 @@ o.spec("render", function() {
|
|||
|
||||
svg = m("svg",
|
||||
m("g", {key: 1, x: 1}),
|
||||
m("g", {key: 2, x: 2}),
|
||||
m("g", {key: 2, x: 2})
|
||||
)
|
||||
render(root, svg)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue