Skip to content

Commit 69a338e

Browse files
committed
Fix unit tests
1 parent 67e4162 commit 69a338e

File tree

8 files changed

+13
-2
lines changed

8 files changed

+13
-2
lines changed

packages/turf-nearest-point-on-line/test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ test("turf-nearest-point-on-line", (t) => {
3939
onLine.properties["marker-color"] = "#F0F";
4040
onLine.properties.dist = round(onLine.properties.dist, 6);
4141
onLine.properties.location = round(onLine.properties.location, 6);
42+
onLine.properties.multiFeatureLocation = round(
43+
onLine.properties.multiFeatureLocation,
44+
6
45+
);
4246
const between = lineString(
4347
[onLine.geometry.coordinates, point.geometry.coordinates],
4448
{ stroke: "#F00", "stroke-width": 6 }
@@ -418,12 +422,12 @@ test("turf-nearest-point-on-line -- issue 2753 multifeature location", (t) => {
418422

419423
t.equal(
420424
Number(nearestToA.properties.multiFeatureLocation.toFixed(6)),
421-
150.293316,
425+
150.296465,
422426
"nearestToA multiFeatureLocation"
423427
);
424428
t.equal(
425429
Number(nearestToB.properties.multiFeatureLocation.toFixed(6)),
426-
157.736676,
430+
157.738215,
427431
"nearestToB multiFeatureLocation"
428432
);
429433
t.end();

packages/turf-nearest-point-on-line/test/out/line-northern-latitude-#344.geojson

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"dist": 5.959562,
4343
"multiFeatureIndex": 0,
4444
"location": 19.748879,
45+
"multiFeatureLocation": 19.748879,
4546
"index": 1,
4647
"marker-color": "#F0F"
4748
},

packages/turf-nearest-point-on-line/test/out/line1.geojson

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"dist": 2.556271,
4343
"multiFeatureIndex": 0,
4444
"location": 22.137494,
45+
"multiFeatureLocation": 22.137494,
4546
"index": 1,
4647
"marker-color": "#F0F"
4748
},

packages/turf-nearest-point-on-line/test/out/multiLine1.geojson

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
"index": 21,
7272
"multiFeatureIndex": 1,
7373
"location": 9479.011715,
74+
"multiFeatureLocation": 4800.716022,
7475
"marker-color": "#F0F"
7576
},
7677
"geometry": {

packages/turf-nearest-point-on-line/test/out/multiLine2.geojson

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
"index": 0,
5353
"multiFeatureIndex": 1,
5454
"location": 1656.139708,
55+
"multiFeatureLocation": 0,
5556
"marker-color": "#F0F"
5657
},
5758
"geometry": {

packages/turf-nearest-point-on-line/test/out/multiLine3.geojson

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"dist": 121.937841,
6161
"multiFeatureIndex": 0,
6262
"location": 214.735285,
63+
"multiFeatureLocation": 214.735285,
6364
"index": 0,
6465
"marker-color": "#F0F"
6566
},

packages/turf-nearest-point-on-line/test/out/route1.geojson

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4795,6 +4795,7 @@
47954795
"dist": 7.876557,
47964796
"multiFeatureIndex": 0,
47974797
"location": 183.46844,
4798+
"multiFeatureLocation": 183.46844,
47984799
"index": 3104,
47994800
"marker-color": "#F0F"
48004801
},

packages/turf-nearest-point-on-line/test/out/route2.geojson

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3799,6 +3799,7 @@
37993799
"dist": 19.22738,
38003800
"multiFeatureIndex": 0,
38013801
"location": 303.639629,
3802+
"multiFeatureLocation": 303.639629,
38023803
"index": 1185,
38033804
"marker-color": "#F0F"
38043805
},

0 commit comments

Comments
 (0)