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 --- test/finance.unit.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/finance.unit.js') diff --git a/test/finance.unit.js b/test/finance.unit.js index 47c457c9..aa617d0a 100644 --- a/test/finance.unit.js +++ b/test/finance.unit.js @@ -85,7 +85,7 @@ describe('finance.js', function () { it("should set a specified length", function () { - var expected = faker.random.number(20); + var expected = faker.datatype.number(20); expected = (expected == 0 || !expected || typeof expected == 'undefined') ? 4 : expected; @@ -138,7 +138,7 @@ describe('finance.js', function () { it("should work when random variables are passed into the arguments", function () { - var length = faker.random.number(20); + var length = faker.datatype.number(20); var ellipsis = (length % 2 === 0) ? true : false; var parens = !ellipsis; -- cgit v1.2.3