Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewharvey committed Aug 6, 2024
1 parent 658c8f8 commit ba45657
Show file tree
Hide file tree
Showing 4 changed files with 170 additions and 0 deletions.
34 changes: 34 additions & 0 deletions packages/turf-line-slice/test/in/id.geojson
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"id": "foo",
"properties": {},
"geometry": {
"type": "LineString",
"coordinates": [
[-97.88131713867188, 22.466878364528448],
[-97.82089233398438, 22.175960091218524],
[-97.6190185546875, 21.8704201873689]
]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [-97.796173, 22.254624]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [-97.727508, 22.057641]
}
}
]
}
35 changes: 35 additions & 0 deletions packages/turf-line-slice/test/in/properties.geojson
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"foo": "bar"
},
"geometry": {
"type": "LineString",
"coordinates": [
[-97.88131713867188, 22.466878364528448],
[-97.82089233398438, 22.175960091218524],
[-97.6190185546875, 21.8704201873689]
]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [-97.796173, 22.254624]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [-97.727508, 22.057641]
}
}
]
}
50 changes: 50 additions & 0 deletions packages/turf-line-slice/test/out/id.geojson
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"id": "foo",
"properties": {},
"geometry": {
"type": "LineString",
"coordinates": [
[-97.88131713867188, 22.466878364528448],
[-97.82089233398438, 22.175960091218524],
[-97.6190185546875, 21.8704201873689]
]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [-97.796173, 22.254624]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [-97.727508, 22.057641]
}
},
{
"type": "Feature",
"id": "foo",
"properties": {
"stroke": "#f0f",
"stroke-width": 6
},
"geometry": {
"type": "LineString",
"coordinates": [
[-97.835729, 22.247393],
[-97.820892, 22.17596],
[-97.738467, 22.051207]
]
}
}
]
}
51 changes: 51 additions & 0 deletions packages/turf-line-slice/test/out/properties.geojson
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"foo": "bar"
},
"geometry": {
"type": "LineString",
"coordinates": [
[-97.88131713867188, 22.466878364528448],
[-97.82089233398438, 22.175960091218524],
[-97.6190185546875, 21.8704201873689]
]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [-97.796173, 22.254624]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [-97.727508, 22.057641]
}
},
{
"type": "Feature",
"properties": {
"stroke": "#f0f",
"stroke-width": 6,
"foo": "bar"
},
"geometry": {
"type": "LineString",
"coordinates": [
[-97.835729, 22.247393],
[-97.820892, 22.17596],
[-97.738467, 22.051207]
]
}
}
]
}

0 comments on commit ba45657

Please sign in to comment.