Skip to content

Commit

Permalink
test(address): update precision cases
Browse files Browse the repository at this point in the history
  • Loading branch information
xDivisionByZerox committed Jul 1, 2022
1 parent 0ed7a2b commit 5d56f93
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/address.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ describe('address', () => {
expect(
latitude.toString().split('.')[1].length,
'The precision of latitude should be 4 digits'
).toBe(4);
).lessThanOrEqual(4);

expect(latitude).toBeGreaterThanOrEqual(-5);
expect(latitude).toBeLessThanOrEqual(5);
Expand All @@ -253,7 +253,7 @@ describe('address', () => {
expect(
latitude.toString().split('.')[1].length,
'The precision of latitude should be 7 digits'
).toBe(7);
).lessThanOrEqual(7);

expect(latitude).toBeGreaterThanOrEqual(-180);
expect(latitude).toBeLessThanOrEqual(180);
Expand All @@ -280,7 +280,7 @@ describe('address', () => {
expect(
longitude.toString().split('.')[1].length,
'The precision of longitude should be 4 digits'
).toBe(4);
).lessThanOrEqual(4);

expect(longitude).toBeGreaterThanOrEqual(-30);
expect(longitude).toBeLessThanOrEqual(100);
Expand All @@ -292,7 +292,7 @@ describe('address', () => {
expect(
longitude.toString().split('.')[1].length,
'The precision of longitude should be 7 digits'
).toBe(7);
).lessThanOrEqual(7);

expect(longitude).toBeGreaterThanOrEqual(-180);
expect(longitude).toBeLessThanOrEqual(180);
Expand Down

0 comments on commit 5d56f93

Please sign in to comment.