@@ -8,7 +8,7 @@ describe('LatLng', () => {
88 // test cases from https://github.com/openstreetmap/openstreetmap-website/blob/master/test/controllers/geocoder_controller_test.rb
99 let expected ;
1010 beforeEach ( ( ) => {
11- expected = L . latLng ( 50.06773 , 14.37742 ) ;
11+ expected = new L . LatLng ( 50.06773 , 14.37742 ) ;
1212 } ) ;
1313
1414 it ( 'geocodes basic lat/lon pairs' , ( ) => {
@@ -41,29 +41,29 @@ describe('LatLng', () => {
4141 geocode ( '50.06773N, 14.37742E' ) ;
4242 } ) ;
4343 it ( 'geocodes lat/lon pairs using N/W with degrees' , ( ) => {
44- expected = L . latLng ( 50.06773 , - 14.37742 ) ;
44+ expected = new L . LatLng ( 50.06773 , - 14.37742 ) ;
4545 geocode ( 'N50.06773 W14.37742' ) ;
4646 geocode ( 'N50.06773, W14.37742' ) ;
4747 geocode ( '50.06773N 14.37742W' ) ;
4848 geocode ( '50.06773N, 14.37742W' ) ;
4949 } ) ;
5050 it ( 'geocodes lat/lon pairs using S/E with degrees' , ( ) => {
51- expected = L . latLng ( - 50.06773 , 14.37742 ) ;
51+ expected = new L . LatLng ( - 50.06773 , 14.37742 ) ;
5252 geocode ( 'S50.06773 E14.37742' ) ;
5353 geocode ( 'S50.06773, E14.37742' ) ;
5454 geocode ( '50.06773S 14.37742E' ) ;
5555 geocode ( '50.06773S, 14.37742E' ) ;
5656 } ) ;
5757 it ( 'geocodes lat/lon pairs using S/W with degrees' , ( ) => {
58- expected = L . latLng ( - 50.06773 , - 14.37742 ) ;
58+ expected = new L . LatLng ( - 50.06773 , - 14.37742 ) ;
5959 geocode ( 'S50.06773 W14.37742' ) ;
6060 geocode ( 'S50.06773, W14.37742' ) ;
6161 geocode ( '50.06773S 14.37742W' ) ;
6262 geocode ( '50.06773S, 14.37742W' ) ;
6363 } ) ;
6464
6565 it ( 'geocodes lat/lon pairs using N/E with degrees/mins' , ( ) => {
66- expected = L . latLng ( 50.06773333333334 , 14.377416666666667 ) ;
66+ expected = new L . LatLng ( 50.06773333333334 , 14.377416666666667 ) ;
6767 geocode ( 'N 50° 04.064 E 014° 22.645' ) ;
6868 geocode ( "N 50° 04.064' E 014° 22.645" ) ;
6969 geocode ( "N 50° 04.064', E 014° 22.645'" ) ;
@@ -73,7 +73,7 @@ describe('LatLng', () => {
7373 geocode ( "50° 04.064' N, 014° 22.645' E" ) ;
7474 } ) ;
7575 it ( 'geocodes lat/lon pairs using N/W with degrees/mins' , ( ) => {
76- expected = L . latLng ( 50.06773333333334 , - 14.377416666666667 ) ;
76+ expected = new L . LatLng ( 50.06773333333334 , - 14.377416666666667 ) ;
7777 geocode ( 'N 50° 04.064 W 014° 22.645' ) ;
7878 geocode ( "N 50° 04.064' W 014° 22.645" ) ;
7979 geocode ( "N 50° 04.064', W 014° 22.645'" ) ;
@@ -83,7 +83,7 @@ describe('LatLng', () => {
8383 geocode ( "50° 04.064' N, 014° 22.645' W" ) ;
8484 } ) ;
8585 it ( 'geocodes lat/lon pairs using S/E with degrees/mins' , ( ) => {
86- expected = L . latLng ( - 50.06773333333334 , 14.377416666666667 ) ;
86+ expected = new L . LatLng ( - 50.06773333333334 , 14.377416666666667 ) ;
8787 geocode ( 'S 50° 04.064 E 014° 22.645' ) ;
8888 geocode ( "S 50° 04.064' E 014° 22.645" ) ;
8989 geocode ( "S 50° 04.064', E 014° 22.645'" ) ;
@@ -93,7 +93,7 @@ describe('LatLng', () => {
9393 geocode ( "50° 04.064' S, 014° 22.645' E" ) ;
9494 } ) ;
9595 it ( 'geocodes lat/lon pairs using S/W with degrees/mins' , ( ) => {
96- expected = L . latLng ( - 50.06773333333334 , - 14.377416666666667 ) ;
96+ expected = new L . LatLng ( - 50.06773333333334 , - 14.377416666666667 ) ;
9797 geocode ( 'S 50° 04.064 W 014° 22.645' ) ;
9898 geocode ( "S 50° 04.064' W 014° 22.645" ) ;
9999 geocode ( "S 50° 04.064', W 014° 22.645'" ) ;
@@ -112,7 +112,7 @@ describe('LatLng', () => {
112112 geocode ( '50°4\'3.828"N 14°22\'38.712"E' ) ;
113113 } ) ;
114114 it ( 'geocodes lat/lon pairs using N/W with degrees/mins/secs' , ( ) => {
115- expected = L . latLng ( 50.06773 , - 14.37742 ) ;
115+ expected = new L . LatLng ( 50.06773 , - 14.37742 ) ;
116116 geocode ( 'N 50° 4\' 03.828" W 14° 22\' 38.712"' ) ;
117117 geocode ( 'N 50° 4\' 03.828", W 14° 22\' 38.712"' ) ;
118118 geocode ( 'N 50° 4′ 03.828″, W 14° 22′ 38.712″' ) ;
@@ -121,7 +121,7 @@ describe('LatLng', () => {
121121 geocode ( '50°4\'3.828"N 14°22\'38.712"W' ) ;
122122 } ) ;
123123 it ( 'geocodes lat/lon pairs using S/E with degrees/mins/secs' , ( ) => {
124- expected = L . latLng ( - 50.06773 , 14.37742 ) ;
124+ expected = new L . LatLng ( - 50.06773 , 14.37742 ) ;
125125 geocode ( 'S 50° 4\' 03.828" E 14° 22\' 38.712"' ) ;
126126 geocode ( 'S 50° 4\' 03.828", E 14° 22\' 38.712"' ) ;
127127 geocode ( 'S 50° 4′ 03.828″, E 14° 22′ 38.712″' ) ;
@@ -130,7 +130,7 @@ describe('LatLng', () => {
130130 geocode ( '50°4\'3.828"S 14°22\'38.712"E' ) ;
131131 } ) ;
132132 it ( 'geocodes lat/lon pairs using S/W with degrees/mins/secs' , ( ) => {
133- expected = L . latLng ( - 50.06773 , - 14.37742 ) ;
133+ expected = new L . LatLng ( - 50.06773 , - 14.37742 ) ;
134134 geocode ( 'S 50° 4\' 03.828" W 14° 22\' 38.712"' ) ;
135135 geocode ( 'S 50° 4\' 03.828", W 14° 22\' 38.712"' ) ;
136136 geocode ( 'S 50° 4′ 03.828″, W 14° 22′ 38.712″' ) ;
0 commit comments