From f1b446fb69772d820167d68acda2b10c92aed3b4 Mon Sep 17 00:00:00 2001 From: Jacob Goense Date: Sun, 1 Jan 2017 07:36:05 -0500 Subject: Fix typo in price() description --- test/commerce.unit.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/commerce.unit.js b/test/commerce.unit.js index 06445e34..1cd02b18 100644 --- a/test/commerce.unit.js +++ b/test/commerce.unit.js @@ -72,7 +72,7 @@ describe("commerce.js", function() { }); }); - describe("price(min, max, dec, symbol", function() { + describe("price(min, max, dec, symbol)", function() { it("should use the default amounts when not passing arguments", function() { var price = faker.commerce.price(); @@ -112,4 +112,4 @@ describe("commerce.js", function() { }); }); -}); \ No newline at end of file +}); -- cgit v1.2.3 From 3f99cb44425c2fc1be8dfb74abbaf01a436b0646 Mon Sep 17 00:00:00 2001 From: Jacob Goense Date: Sun, 1 Jan 2017 07:39:47 -0500 Subject: Set default minimum price to 1 According to the test the minimum amount should be greater than 0 when not passing arguments. This failed about 1 in 1000 times. --- lib/commerce.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/commerce.js b/lib/commerce.js index 306cf337..4de11ef5 100644 --- a/lib/commerce.js +++ b/lib/commerce.js @@ -44,7 +44,7 @@ var Commerce = function (faker) { * @param {string} symbol */ self.price = function(min, max, dec, symbol) { - min = min || 0; + min = min || 1; max = max || 1000; dec = dec || 2; symbol = symbol || ''; -- cgit v1.2.3