test(junction): cover heading wrap stability
This commit is contained in:
1 parent
88fcee94a0
commit
af286c6149
1 file changed
+17
@@ -367,3 +367,20 @@ const offsetUnequalGraph = buildJunctionBoundaryGraph(
|
||||
offsetUnequal.helpers,
|
||||
);
|
||||
assertCoreGeometry(offsetUnequal.topology, offsetUnequalGraph, point(0, 0));
|
||||
|
||||
const wrappedRotationEntries = sixArmEntries.map((entry) => ({
|
||||
...entry,
|
||||
line: entry.line.map((coordinate) => rotate(coordinate, 350)),
|
||||
}));
|
||||
const wrappedRotation = fixture('six-arm', wrappedRotationEntries);
|
||||
const wrappedTopology = resolveJunctionBuildPlan(
|
||||
wrappedRotation.model,
|
||||
wrappedRotation.cluster,
|
||||
wrappedRotation.helpers,
|
||||
);
|
||||
assert.deepEqual(
|
||||
wrappedTopology.arms.map((arm) => arm.key).sort(),
|
||||
sixArm.topology.arms.map((arm) => arm.key).sort(),
|
||||
'arm identity must remain stable across the -180/180 heading wrap',
|
||||
);
|
||||
assert.equal(wrappedTopology.arms.length, sixArm.topology.arms.length);
|
||||
Reference in new issue
Block a user