diff --git a/test/Logic/FeatureSource/ClusteringFeatureSource.spec.ts b/test/Logic/FeatureSource/ClusteringFeatureSource.spec.ts index eae7f554b0..d37b9b2e73 100644 --- a/test/Logic/FeatureSource/ClusteringFeatureSource.spec.ts +++ b/test/Logic/FeatureSource/ClusteringFeatureSource.spec.ts @@ -1,7 +1,10 @@ import { FeatureCollection, Point } from "geojson" import { describe, it } from "vitest" import StaticFeatureSource from "../../../src/Logic/FeatureSource/Sources/StaticFeatureSource" -import { ClusteringFeatureSource } from "../../../src/Logic/FeatureSource/TiledFeatureSource/ClusteringFeatureSource" +import { + ClusterGrouping, + ClusteringFeatureSource +} from "../../../src/Logic/FeatureSource/TiledFeatureSource/ClusteringFeatureSource" import { UIEventSource } from "../../../src/Logic/UIEventSource" import { expect } from "chai" @@ -64,14 +67,14 @@ describe("ClusteringFeatureSource", () => { cutoff: 2, dontClusterAboveZoom: 100 }) - expect(clusteringSource.summaryPoints.features.data.length).to.eq(0) + const allClusters = ClusterGrouping.singleton.features + expect(allClusters.data.length).to.eq(0) expect(clusteringSource.features.data.length).to.eq(4) zoom.set(13) - const summary = clusteringSource.summaryPoints.features.data - expect(summary.length).to.eq(1) - expect(summary[0].properties["total_metric"]).to.eq("4") + expect(allClusters.data.length).to.eq(1) + expect(allClusters.data[0].properties["total_metric"]).to.eq("4") expect(clusteringSource.features.data.length).to.eq(0)