components, angular dbmon
This commit is contained in:
parent
ba378d3652
commit
3282ef3f77
30 changed files with 1270 additions and 248 deletions
20
render/tests/test-normalizeChildren.js
Normal file
20
render/tests/test-normalizeChildren.js
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
"use strict"
|
||||
|
||||
var o = require("../../ospec/ospec")
|
||||
var Node = require("../../render/node")
|
||||
|
||||
o.spec("normalizeChildren", function() {
|
||||
o("normalizes arrays into fragments", function() {
|
||||
var children = Node.normalizeChildren([[]])
|
||||
|
||||
o(children[0].tag).equals("[")
|
||||
o(children[0].children.length).equals(0)
|
||||
})
|
||||
o("normalizes strings into text nodes", function() {
|
||||
var children = Node.normalizeChildren(["a"])
|
||||
|
||||
o(children[0].tag).equals("#")
|
||||
o(children[0].children).equals("a")
|
||||
})
|
||||
})
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue