diff --git a/src/modules/datatype/index.ts b/src/modules/datatype/index.ts index a81a9681b33..df2cac876fc 100644 --- a/src/modules/datatype/index.ts +++ b/src/modules/datatype/index.ts @@ -49,7 +49,7 @@ export class Datatype { } if (max < min) { - throw new FakerError(`Max ${max} should be larger then min ${min}.`); + throw new FakerError(`Max ${max} should be greater than min ${min}.`); } const randomNumber = Math.floor( diff --git a/test/datatype.spec.ts b/test/datatype.spec.ts index 96d40cff027..bd00c8ddf88 100644 --- a/test/datatype.spec.ts +++ b/test/datatype.spec.ts @@ -297,7 +297,7 @@ describe('datatype', () => { expect(() => { faker.datatype.number({ min, max }); - }).toThrowError(`Max ${max} should be larger then min ${min}.`); + }).toThrowError(`Max ${max} should be greater than min ${min}.`); }); });