Skip to content

Commit

Permalink
do not infinite loop on random layouts anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
vjeux committed Dec 11, 2014
1 parent a81f4ab commit 8031cbe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Layout-test-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ var layoutTestUtils = (function() {
}

fillNodes(rootNode);
rootNode.style.alignSelf = 'flex-start';
realComputeLayout(rootNode);
return extractNodes(rootNode);
}
Expand Down Expand Up @@ -304,12 +303,16 @@ var layoutTestUtils = (function() {
textSizes: textSizes,
preDefinedTextSizes: preDefinedTextSizes,
testLayout: function(node, expectedLayout) {
node.style = node.style || {};
node.style.alignSelf = 'flex-start';
var layout = computeCSSLayout(node);
var domLayout = computeDOMLayout(node);
testNamedLayout('expected-dom', expectedLayout, domLayout);
testNamedLayout('layout-dom', layout, domLayout);
},
testRandomLayout: function(node, i) {
node.style = node.style || {};
node.style.alignSelf = 'flex-start';
expect({i: i, node: node, layout: computeCSSLayout(node)})
.toEqual({i: i, node: node, layout: computeDOMLayout(node)});
},
Expand Down

0 comments on commit 8031cbe

Please sign in to comment.