forked from MapComplete/MapComplete
Fix: fix tests
This commit is contained in:
parent
63e9d20255
commit
520e4d8a89
1 changed files with 8 additions and 5 deletions
|
@ -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)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue