Skip to content

Commit

Permalink
map property utils test correction.
Browse files Browse the repository at this point in the history
  • Loading branch information
Smith authored and Smith committed Feb 13, 2024
1 parent e60f2a5 commit 2f7af8f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions source/frontend/src/utils/mapPropertyUtils.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe('mapPropertyUtils', () => {
],
[{ planNumber: undefined }, { label: NameSourceType.NONE, value: '' }],
[{ planNumber: '' }, { label: NameSourceType.NONE, value: '' }],
[{ planNumber: '1' }, { label: NameSourceType.PLAN, value: '' }],
[{ planNumber: '1' }, { label: NameSourceType.PLAN, value: '1' }],
[
{ planNumber: 'PB1000', latitude: 1, longitude: 1, address: '1234 fake st' },
{ label: NameSourceType.PLAN, value: 'PB1000' },
Expand All @@ -79,11 +79,11 @@ describe('mapPropertyUtils', () => {
[{ planNumber: '' }, { label: NameSourceType.NONE, value: '' }],
[
{ latitude: 1, longitude: 2, address: '1234 fake st' },
{ label: NameSourceType.LOCATION, value: '1.000000,2.000000' },
{ label: NameSourceType.LOCATION, value: '2.000000, 1.000000' },
],
[{ address: undefined }, { label: NameSourceType.NONE, value: '' }],
[{ address: '' }, { label: NameSourceType.NONE, value: '' }],
[{ address: '1234 fake st' }, { label: NameSourceType.ADDRESS, value: '' }],
[{ address: '1234 fake st' }, { label: NameSourceType.ADDRESS, value: '1234 fake st' }],
])(
'getPropertyName test with source %p expecting %p',
(mapProperty: IMapProperty, expectedName: PropertyName) => {
Expand All @@ -95,7 +95,7 @@ describe('mapPropertyUtils', () => {

it('getPrettyLatLng, empty', () => {
const prettyLatLng = getPrettyLatLng(undefined);
expect(prettyLatLng).toEqual('0, 0');
expect(prettyLatLng).toEqual('');
});

it('getPrettyLatLng, valued', () => {
Expand All @@ -110,7 +110,7 @@ describe('mapPropertyUtils', () => {

it('getLatLng, valued', () => {
const latLng = getLatLng({ coordinate: { x: 1, y: 2 } });
expect(latLng).toEqual({ lat: 1, lng: 2 });
expect(latLng).toEqual({ lat: 2, lng: 1 });
});

it.each([
Expand Down

0 comments on commit 2f7af8f

Please sign in to comment.