One level children

This commit is contained in:
Christopher Chedeau
2014-03-30 19:18:06 -07:00
parent 5ea06e888b
commit 8713562160
2 changed files with 38 additions and 5 deletions

View File

@@ -88,10 +88,25 @@ describe('Layout', function() {
testLayout({
style: {width: 100, height: 200}
}, {
width: 100,
height: 200,
left: 0,
top: 0
width: 100, height: 200, left: 0, top: 0
});
});
it('should layout node with children', function() {
testLayout({
style: {width: 1000, height: 1000},
children: [
{style: {width: 500, height: 500}},
{style: {width: 250, height: 250}},
{style: {width: 125, height: 125}}
]
}, {
width: 1000, height: 1000, left: 0, top: 0,
children: [
{width: 500, height: 500, top: 0, left: 0},
{width: 250, height: 250, top: 500, left: 0},
{width: 125, height: 125, top: 750, left: 0}
]
});
});
});