Исправили отображение связей V3

This commit is contained in:
AidarKC
2026-11-11 00:52:46 +03:00
parent 689321da1a
commit e7f6e0580c
5 changed files with 35 additions and 7 deletions
@@ -111,3 +111,13 @@ test('V3: регистр логина для запросов, обновлен
assert.equal(g.snapshot('Alice').nodes.find((n) => n.id === 'bobuser').shining, false);
assert.equal(g.snapshot('Alice').nodes.some((n) => n.id === 'carol'), false);
});
test('V3: взаимная связь сохраняет оба типа для красно-синего перехода', () => {
const g = createExplorerGraph();
g.add(friends('a', ['b']));
g.add(friends('b', [], ['a']));
const edge = find(g.snapshot('a', { depth: 0 }), 'b').edgeParents[0];
assert.equal(edge.relationType, 'friend');
assert.equal(edge.reverseRelationType, 'close_friend');
assert.equal(edge.mutual, true);
});