Permalink
Browse files

children of children

  • Loading branch information...
1 parent 11e1eff commit d56af3515e06560fc60009c22f2cdc67374cfb7d @sconover sconover committed Dec 8, 2010
Showing with 7 additions and 1 deletion.
  1. +7 −1 specs/node_spec.js
View
@@ -11,7 +11,7 @@ describe("Jaml.Node", function() {
assert.equal("<fooBar/>\n", new Jaml.Node("fooBar").render());
});
- it("textarea (for example) should not self-close", function(){
+ it("doesn't self-close for (for example) textarea", function(){
assert.equal("<textarea></textarea>\n", new Jaml.Node("textarea").render());
});
@@ -89,6 +89,12 @@ describe("Jaml.Node", function() {
addChild(new Jaml.Node("y")).
addChild(new Jaml.Node("z")).render());
});
+
+ it("renders children of children", function(){
+ assert.equal("<fooBar>\n <x>\n <J/>\n </x>\n <y>\n <K/>\n </y>\n</fooBar>\n",
+ fooBar.addChild(new Jaml.Node("x").addChild(new Jaml.Node("J"))).
+ addChild(new Jaml.Node("y").addChild(new Jaml.Node("K"))).render());
+ });
});
});

0 comments on commit d56af35

Please sign in to comment.