From 08cd7089eafa5a222337669fe9183c1fb3fdcfa1 Mon Sep 17 00:00:00 2001 From: Denis Date: Mon, 28 Nov 2016 00:03:27 -0500 Subject: [PATCH] Add Typescript tests #515 #524 --- packages/turf-meta/{test-types.ts => test/types.ts} | 2 +- packages/turf-random/test/types.ts | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) rename packages/turf-meta/{test-types.ts => test/types.ts} (98%) create mode 100644 packages/turf-random/test/types.ts diff --git a/packages/turf-meta/test-types.ts b/packages/turf-meta/test/types.ts similarity index 98% rename from packages/turf-meta/test-types.ts rename to packages/turf-meta/test/types.ts index f38e26b013..68c73ca289 100644 --- a/packages/turf-meta/test-types.ts +++ b/packages/turf-meta/test/types.ts @@ -1,4 +1,4 @@ -import * as meta from './index' +import * as meta from '../index' const pointGeometry: GeoJSON.Point = { type: 'Point', diff --git a/packages/turf-random/test/types.ts b/packages/turf-random/test/types.ts new file mode 100644 index 0000000000..9085c6f63f --- /dev/null +++ b/packages/turf-random/test/types.ts @@ -0,0 +1,8 @@ +import * as random from '../index' + +const equals_1: GeoJSON.FeatureCollection = random('points', 3, {bbox: [1, 2, 3, 4]}) +const equals_2: GeoJSON.FeatureCollection = random('point') +const equals_3: GeoJSON.FeatureCollection = random() +const equals_4: GeoJSON.FeatureCollection = random(undefined) +const equals_5: GeoJSON.FeatureCollection = random('polygon') +const equals_6: GeoJSON.FeatureCollection = random('polygon')