From 37c518943e9796bf6f468e5a66038bb0d73f4a61 Mon Sep 17 00:00:00 2001 From: Christopher Chedeau Date: Mon, 21 Apr 2014 18:50:34 -0700 Subject: [PATCH] increase the random factor in order to get more failing tests :) --- src/Layout-test-utils.js | 2 +- src/__tests__/Layout-test.js | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Layout-test-utils.js b/src/Layout-test-utils.js index d920b8f5..1dca0677 100644 --- a/src/Layout-test-utils.js +++ b/src/Layout-test-utils.js @@ -148,7 +148,7 @@ var layoutTestUtils = (function() { node.style[key] = Math.round(value / 100) * 100; } else if (value > 10) { node.style[key] = Math.round(value / 10) * 10; - } else if (value > 0) { + } else if (value > 1) { node.style[key] = 5; } if (node.style[key] !== value) { diff --git a/src/__tests__/Layout-test.js b/src/__tests__/Layout-test.js index d72f686f..04bcfe0e 100755 --- a/src/__tests__/Layout-test.js +++ b/src/__tests__/Layout-test.js @@ -633,19 +633,19 @@ describe('Layout', function() { } function generateRandomNode() { var node = {style: {}}; - randMinMax(node, 0.1, 'width', 0, 1000); - randMinMax(node, 0.1, 'height', 0, 1000); + randMinMax(node, 0.5, 'width', 0, 1000); + randMinMax(node, 0.5, 'height', 0, 1000); randMinMax(node, 0.5, 'top', -10, 10); randMinMax(node, 0.5, 'left', -10, 10); - randMinMax(node, 0.1, 'right', -10, 10); - randMinMax(node, 0.1, 'bottom', -10, 10); - randSpacing(node, 0.1, 'margin', 0, 20); - randSpacing(node, 0.1, 'padding', 0, 20); - randEnum(node, 0.1, 'flexDirection', ['column', 'row']); - randEnum(node, 0.1, 'justifyContent', ['flex-start', 'center', 'flex-end', 'space-between', 'space-around']); - randEnum(node, 0.1, 'alignItems', ['flex-start', 'center', 'flex-end', 'stretch']); - randEnum(node, 0.1, 'alignSelf', ['flex-start', 'center', 'flex-end', 'stretch']); - randEnum(node, 0.1, 'flex', ['none', 1]); + randMinMax(node, 0.5, 'right', -10, 10); + randMinMax(node, 0.5, 'bottom', -10, 10); + randSpacing(node, 0.5, 'margin', 0, 20); + randSpacing(node, 0.5, 'padding', 0, 20); + randEnum(node, 0.5, 'flexDirection', ['column', 'row']); + randEnum(node, 0.5, 'justifyContent', ['flex-start', 'center', 'flex-end', 'space-between', 'space-around']); + randEnum(node, 0.5, 'alignItems', ['flex-start', 'center', 'flex-end', 'stretch']); + randEnum(node, 0.5, 'alignSelf', ['flex-start', 'center', 'flex-end', 'stretch']); + randEnum(node, 0.5, 'flex', ['none', 1]); randEnum(node, 0.5, 'position', ['relative', 'absolute']); randChildren(node, 0.2); return node;