import assert from "node:assert/strict";
import test from "node:test";
import { isMapLiveDataSlot } from "./map-live-data-slot.mjs";

test("point, zone and subject aspect streams are approved Map live-data slots", () => {
  assert.equal(isMapLiveDataSlot({ id: "points", kind: "entity-stream" }), true);
  assert.equal(isMapLiveDataSlot({ id: "zones", kind: "zone-stream" }), true);
  assert.equal(isMapLiveDataSlot({ id: "subject-details", kind: "subject-aspect-stream" }), true);
});

test("non-entity Map slots cannot receive a data-product binding", () => {
  for (const kind of ["trace-stream", "route-stream", "selection", "command", "assistant", undefined]) {
    assert.equal(isMapLiveDataSlot(kind ? { id: "other", kind } : null), false);
  }
});
