UNPKG

@seasketch/geoprocessing

Version:

Geoprocessing and reporting framework for SeaSketch 2.0

17 lines (16 loc) 985 B
import { Feature } from "geojson"; import { Sketch } from "../../src/index.js"; /** * Runs a basic smoke test on a preprocessor function that takes feature or sketch polygon input * For each example provided, runs the preprocessing function and checks that the output is truthy, * and that the geometry is valid according to the OGC spec using turf.booleanValid * then outputs the result to examples/output directory. If you need more comprehensive tests, * consider writing additional tests after calling this test or simply copying the source code for this test * function to create your own. */ export declare const polygonSmokeTest: (preprocessorFunc: (feature: Feature) => Promise<Feature>, preprocessorName: string, examples: Feature[] | Sketch[], options?: { /** timeout for test run in milliseconds, defaults to 10000 or 10 seconds */ timeout?: number; /** If true console outputs the name of the example on start of run */ debug?: boolean; }) => void;