aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/__snapshots__/finance.spec.ts.snap4
-rw-r--r--test/__snapshots__/location.spec.ts.snap4
-rw-r--r--test/number.spec.ts19
3 files changed, 12 insertions, 15 deletions
diff --git a/test/__snapshots__/finance.spec.ts.snap b/test/__snapshots__/finance.spec.ts.snap
index 33737a1a..95fa5c26 100644
--- a/test/__snapshots__/finance.spec.ts.snap
+++ b/test/__snapshots__/finance.spec.ts.snap
@@ -14,7 +14,7 @@ exports[`finance > 42 > amount > with max 1`] = `"18.73"`;
exports[`finance > 42 > amount > with min 1`] = `"380.79"`;
-exports[`finance > 42 > amount > with min and max and dec and symbol 1`] = `"$24.98160"`;
+exports[`finance > 42 > amount > with min and max and dec and symbol 1`] = `"$24.98161"`;
exports[`finance > 42 > bic > noArgs 1`] = `"UYETSCLLG53"`;
@@ -146,7 +146,7 @@ exports[`finance > 1337 > amount > with max 1`] = `"13.10"`;
exports[`finance > 1337 > amount > with min 1`] = `"269.40"`;
-exports[`finance > 1337 > amount > with min and max and dec and symbol 1`] = `"$20.48098"`;
+exports[`finance > 1337 > amount > with min and max and dec and symbol 1`] = `"$20.48099"`;
exports[`finance > 1337 > bic > noArgs 1`] = `"OEFHLYG18IL"`;
diff --git a/test/__snapshots__/location.spec.ts.snap b/test/__snapshots__/location.spec.ts.snap
index bceda5a4..41e9f8c0 100644
--- a/test/__snapshots__/location.spec.ts.snap
+++ b/test/__snapshots__/location.spec.ts.snap
@@ -112,8 +112,8 @@ exports[`location > 1211 > longitude > noArgs 1`] = `154.2673`;
exports[`location > 1211 > nearbyGPSCoordinate > near origin 1`] = `
[
- -0.02872051646443488,
- 0.05959053473372933,
+ -0.02872111236834616,
+ 0.05959024752564801,
]
`;
diff --git a/test/number.spec.ts b/test/number.spec.ts
index 7605a513..f5480439 100644
--- a/test/number.spec.ts
+++ b/test/number.spec.ts
@@ -130,15 +130,13 @@ describe('number', () => {
}).toThrowError(`Max ${max} should be greater than min ${min}.`);
});
- // TODO @Shinigami92 2022-11-24: https://github.com/faker-js/faker/issues/1595
- it.todo(
- 'should throw when there is no integer between min and max',
- () => {
- expect(() => {
- faker.number.int({ min: 2.1, max: 2.9 });
- }).toThrow();
- }
- );
+ it('should throw when there is no integer between min and max', () => {
+ expect(() => {
+ faker.number.int({ min: 2.1, max: 2.9 });
+ }).toThrow(
+ new FakerError(`No integer value between 2.1 and 2.9 found.`)
+ );
+ });
});
describe('float', () => {
@@ -193,8 +191,7 @@ describe('number', () => {
expect(results).toEqual([0, 0.5, 1, 1.5]);
});
- // TODO @Shinigami92 2022-11-24: https://github.com/faker-js/faker/issues/1595
- it.todo('provides numbers with a given precision of 0.4 steps', () => {
+ it('provides numbers with a given precision of 0.4 steps', () => {
const results = Array.from(
new Set(
Array.from({ length: 50 }, () =>