mirror of
https://github.com/Turfjs/turf.git
synced 2026-01-18 16:02:57 +00:00
* Configure ESlint and Prettier - Disable all eslint rules that trigger - Build's lint step now runs monorepoint, prettier, and eslint - Remove all tslint references * [auto] run prettier on everything Co-authored-by: Matt Fedderly <mfedderly@palantir.com>
21 lines
580 B
JavaScript
21 lines
580 B
JavaScript
import test from "tape";
|
|
import { point } from "@turf/helpers";
|
|
import { featureCollection } from "@turf/helpers";
|
|
import sample from "./index";
|
|
|
|
test("remove", function (t) {
|
|
var points = featureCollection([
|
|
point([1, 2], { team: "Red Sox" }),
|
|
point([2, 1], { team: "Yankees" }),
|
|
point([3, 1], { team: "Nationals" }),
|
|
point([2, 2], { team: "Yankees" }),
|
|
point([2, 3], { team: "Red Sox" }),
|
|
point([4, 2], { team: "Yankees" }),
|
|
]);
|
|
|
|
const results = sample(points, 4);
|
|
|
|
t.equal(results.features.length, 4, "should sample 4 features");
|
|
t.end();
|
|
});
|