mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-03-28 17:43:05 +01:00
28 lines
689 B
TypeScript
28 lines
689 B
TypeScript
import { describe, expect, it } from 'vitest';
|
|
|
|
import { getSceneNodeLabel } from '../components/visualizer/shared';
|
|
|
|
describe('visualizer shared label helpers', () => {
|
|
it('adds an ambiguity suffix to in-graph labels for ambiguous nodes', () => {
|
|
expect(
|
|
getSceneNodeLabel({
|
|
id: '?32',
|
|
name: 'Likely Relay',
|
|
type: 'repeater',
|
|
isAmbiguous: true,
|
|
})
|
|
).toBe('Likely Relay (?)');
|
|
});
|
|
|
|
it('does not add an ambiguity suffix to unambiguous nodes', () => {
|
|
expect(
|
|
getSceneNodeLabel({
|
|
id: 'aaaaaaaaaaaa',
|
|
name: 'Alice',
|
|
type: 'client',
|
|
isAmbiguous: false,
|
|
})
|
|
).toBe('Alice');
|
|
});
|
|
});
|