feat(workbench): expand SCADA monitoring and investigation presentation
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { formatGpsCoordinate, mergeEventLocation } from "./event-location-coordinate";
|
||||
|
||||
describe("event location GPS formatting", () => {
|
||||
it("formats coordinates with stable GPS precision", () => {
|
||||
expect(formatGpsCoordinate([121.4791234, 31.2359876])).toBe("121.479123, 31.235988");
|
||||
});
|
||||
|
||||
it("keeps the written location and persists the selected coordinate", () => {
|
||||
expect(mergeEventLocation(" 演示路口 ", [121.4791234, 31.2359876]))
|
||||
.toBe("演示路口(GPS:121.479123, 31.235988)");
|
||||
expect(mergeEventLocation("", [121.4791234, 31.2359876]))
|
||||
.toBe("GPS:121.479123, 31.235988");
|
||||
expect(mergeEventLocation(" 演示路口 ", null)).toBe("演示路口");
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user