feat: add Docker/OpenTofu deployment and DE/NL routing
This commit is contained in:
@@ -1,10 +1,29 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
deduplicateMarineContactFeatures,
|
||||
FeatureService,
|
||||
normalizeDepthFeatureProperties,
|
||||
normalizeMarineFeatureProperties
|
||||
} from "../src/services/features.js";
|
||||
|
||||
describe("marine feature data modes", () => {
|
||||
it("does not expose demo markers when production disables demo data without PostGIS", async () => {
|
||||
const service = new FeatureService({
|
||||
databaseUrl: undefined,
|
||||
demoData: false
|
||||
});
|
||||
|
||||
const result = await service.getFeatures({
|
||||
bbox: [5, 50, 15, 56],
|
||||
layers: ["seamarks", "locks", "harbours"]
|
||||
});
|
||||
|
||||
expect(result.features).toEqual([]);
|
||||
expect(result.metadata.source).toBe("unavailable");
|
||||
await service.close();
|
||||
});
|
||||
});
|
||||
|
||||
describe("marine feature normalization", () => {
|
||||
it("formats bridge clearance labels from known OSM height tags", () => {
|
||||
const properties = normalizeMarineFeatureProperties({
|
||||
|
||||
Reference in New Issue
Block a user