From 7ad22c2e2aae2f5e6215bcdb91cf3fd28e727d92 Mon Sep 17 00:00:00 2001 From: LBuerstmayr Date: Mon, 1 Mar 2021 22:46:26 +0100 Subject: Issue 1114: New datatype module Current status: - moved number(), float(), hexaDecimal(), boolean(), uuid() from random to datatype - moved respective test from random.unit to datatype.unit - tests of moved methods in random now check if DeprecationWarning is printed and respective method in datatype module is called - adapted all lib files that use moved methods (mostly number) - adapted tests of respective files to spy on the correct method - adapted README in order to promote usage of method that logs a DeprecationWarning --- lib/commerce.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/commerce.js') diff --git a/lib/commerce.js b/lib/commerce.js index 6de8ffb9..d5f95e52 100644 --- a/lib/commerce.js +++ b/lib/commerce.js @@ -55,7 +55,7 @@ var Commerce = function (faker) { return symbol + 0.00; } - var randValue = faker.random.number({ max: max, min: min }); + var randValue = faker.datatype.number({ max: max, min: min }); return symbol + (Math.round(randValue * Math.pow(10, dec)) / Math.pow(10, dec)).toFixed(dec); }; -- cgit v1.2.3