Add editorconfig, resolve differences

This includes newlines, tabs, among other things.
This commit is contained in:
impinball 2016-06-18 02:59:42 -04:00
parent 80d0a69dab
commit b4fb21475c
90 changed files with 1707 additions and 1701 deletions

View file

@ -14,27 +14,27 @@ o.spec("textContent", function() {
o("ignores null", function() {
var vnodes = [{tag: "a", text: null}]
render(root, vnodes)
o(root.childNodes.length).equals(1)
o(vnodes[0].dom.childNodes.length).equals(0)
o(vnodes[0].dom).equals(root.childNodes[0])
})
o("ignores undefined", function() {
var vnodes = [{tag: "a", text: undefined}]
render(root, vnodes)
o(root.childNodes.length).equals(1)
o(vnodes[0].dom.childNodes.length).equals(0)
o(vnodes[0].dom).equals(root.childNodes[0])
})
o("creates string", function() {
var vnodes = [{tag: "a", text: "a"}]
render(root, vnodes)
o(root.childNodes.length).equals(1)
o(vnodes[0].dom.childNodes.length).equals(1)
o(vnodes[0].dom.childNodes[0].nodeValue).equals("a")
@ -42,9 +42,9 @@ o.spec("textContent", function() {
})
o("creates falsy string", function() {
var vnodes = [{tag: "a", text: ""}]
render(root, vnodes)
o(root.childNodes.length).equals(1)
o(vnodes[0].dom.childNodes.length).equals(1)
o(vnodes[0].dom.childNodes[0].nodeValue).equals("")
@ -52,9 +52,9 @@ o.spec("textContent", function() {
})
o("creates number", function() {
var vnodes = [{tag: "a", text: 1}]
render(root, vnodes)
o(root.childNodes.length).equals(1)
o(vnodes[0].dom.childNodes.length).equals(1)
o(vnodes[0].dom.childNodes[0].nodeValue).equals("1")
@ -62,9 +62,9 @@ o.spec("textContent", function() {
})
o("creates falsy number", function() {
var vnodes = [{tag: "a", text: 0}]
render(root, vnodes)
o(root.childNodes.length).equals(1)
o(vnodes[0].dom.childNodes.length).equals(1)
o(vnodes[0].dom.childNodes[0].nodeValue).equals("0")
@ -72,9 +72,9 @@ o.spec("textContent", function() {
})
o("creates boolean", function() {
var vnodes = [{tag: "a", text: true}]
render(root, vnodes)
o(root.childNodes.length).equals(1)
o(vnodes[0].dom.childNodes.length).equals(1)
o(vnodes[0].dom.childNodes[0].nodeValue).equals("true")
@ -82,9 +82,9 @@ o.spec("textContent", function() {
})
o("creates falsy boolean", function() {
var vnodes = [{tag: "a", text: false}]
render(root, vnodes)
o(root.childNodes.length).equals(1)
o(vnodes[0].dom.childNodes.length).equals(1)
o(vnodes[0].dom.childNodes[0].nodeValue).equals("false")
@ -93,10 +93,10 @@ o.spec("textContent", function() {
o("updates to string", function() {
var vnodes = [{tag: "a", text: "a"}]
var updated = [{tag: "a", text: "b"}]
render(root, vnodes)
render(root, updated)
o(root.childNodes.length).equals(1)
o(vnodes[0].dom.childNodes.length).equals(1)
o(vnodes[0].dom.childNodes[0].nodeValue).equals("b")
@ -105,10 +105,10 @@ o.spec("textContent", function() {
o("updates to falsy string", function() {
var vnodes = [{tag: "a", text: "a"}]
var updated = [{tag: "a", text: ""}]
render(root, vnodes)
render(root, updated)
o(root.childNodes.length).equals(1)
o(vnodes[0].dom.childNodes.length).equals(1)
o(vnodes[0].dom.childNodes[0].nodeValue).equals("")
@ -117,10 +117,10 @@ o.spec("textContent", function() {
o("updates to number", function() {
var vnodes = [{tag: "a", text: "a"}]
var updated = [{tag: "a", text: 1}]
render(root, vnodes)
render(root, updated)
o(root.childNodes.length).equals(1)
o(vnodes[0].dom.childNodes.length).equals(1)
o(vnodes[0].dom.childNodes[0].nodeValue).equals("1")
@ -129,10 +129,10 @@ o.spec("textContent", function() {
o("updates to falsy number", function() {
var vnodes = [{tag: "a", text: "a"}]
var updated = [{tag: "a", text: 0}]
render(root, vnodes)
render(root, updated)
o(root.childNodes.length).equals(1)
o(vnodes[0].dom.childNodes.length).equals(1)
o(vnodes[0].dom.childNodes[0].nodeValue).equals("0")
@ -141,10 +141,10 @@ o.spec("textContent", function() {
o("updates to boolean", function() {
var vnodes = [{tag: "a", text: "a"}]
var updated = [{tag: "a", text: true}]
render(root, vnodes)
render(root, updated)
o(root.childNodes.length).equals(1)
o(vnodes[0].dom.childNodes.length).equals(1)
o(vnodes[0].dom.childNodes[0].nodeValue).equals("true")
@ -153,10 +153,10 @@ o.spec("textContent", function() {
o("updates to falsy boolean", function() {
var vnodes = [{tag: "a", text: "a"}]
var updated = [{tag: "a", text: false}]
render(root, vnodes)
render(root, updated)
o(root.childNodes.length).equals(1)
o(vnodes[0].dom.childNodes.length).equals(1)
o(vnodes[0].dom.childNodes[0].nodeValue).equals("false")
@ -165,10 +165,10 @@ o.spec("textContent", function() {
o("updates with typecasting", function() {
var vnodes = [{tag: "a", text: "1"}]
var updated = [{tag: "a", text: 1}]
render(root, vnodes)
render(root, updated)
o(root.childNodes.length).equals(1)
o(vnodes[0].dom.childNodes.length).equals(1)
o(vnodes[0].dom.childNodes[0].nodeValue).equals("1")
@ -177,10 +177,10 @@ o.spec("textContent", function() {
o("updates from without text to with text", function() {
var vnodes = [{tag: "a"}]
var updated = [{tag: "a", text: "b"}]
render(root, vnodes)
render(root, updated)
o(root.childNodes.length).equals(1)
o(vnodes[0].dom.childNodes.length).equals(1)
o(vnodes[0].dom.childNodes[0].nodeValue).equals("b")
@ -189,12 +189,12 @@ o.spec("textContent", function() {
o("updates from with text to without text", function() {
var vnodes = [{tag: "a", text: "a"}]
var updated = [{tag: "a"}]
render(root, vnodes)
render(root, updated)
o(root.childNodes.length).equals(1)
o(vnodes[0].dom.childNodes.length).equals(0)
o(updated[0].dom).equals(root.childNodes[0])
})
})
})