Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
test(desktop): r1-l4 assert reorder preserves relative order of unmoved tabs
Diego Zacariasc22847e93fc7
diff --git a/desktop-app/ui/src/lib/__tests__/workspaceTabs.test.ts b/desktop-app/ui/src/lib/__tests__/workspaceTabs.test.tsindex 587774053..87e77c4d3 100644--- a/desktop-app/ui/src/lib/__tests__/workspaceTabs.test.ts+++ b/desktop-app/ui/src/lib/__tests__/workspaceTabs.test.ts@@ -507,6 +507,12 @@ describe('workspaceTabs — reorderWorkspaceTab', () => {const clamped = Math.max(0, Math.min(toIndex, state.tabs.length - 1))expect(next.tabs[clamped]!.id).toBe(fromId)+ // (6) every tab that did NOT move keeps its relative order: removing+ // the moved id from both sequences must leave identical orderings.+ expect(next.tabs.map(t => t.id).filter(id => id !== fromId)).toEqual(+ idsBefore.filter(id => id !== fromId)+ )+// (5) a no-op returns the SAME reference.const fromIndex = idsBefore.indexOf(fromId)if (clamped === fromIndex) expect(next).toBe(state)