From 520e4d8a894c26bb826c36f6f6ae8e9742c71b16 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Fri, 25 Jul 2025 19:55:08 +0200 Subject: [PATCH] Fix: fix tests --- .../FeatureSource/ClusteringFeatureSource.spec.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/test/Logic/FeatureSource/ClusteringFeatureSource.spec.ts b/test/Logic/FeatureSource/ClusteringFeatureSource.spec.ts index eae7f554b..d37b9b2e7 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)