Skip to content

Node-based terminal manager for AI coding agents — tmux-backed terminals and parallel agent sessions as draggable nodes on an infinite pan/zoom canvas. macOS, Linux, and a browser Server Edition.

test(tabbar): scope each describe's module handles to its own beforeEach

Bas Milius22423d764ab8
diff --git a/src/renderer/components/TabBar.test.tsx b/src/renderer/components/TabBar.test.tsx
index 917dccc71..f59a33083 100644
--- a/src/renderer/components/TabBar.test.tsx
+++ b/src/renderer/components/TabBar.test.tsx
@@ -230,7 +230,6 @@ describe('TabBar drag-reorder', () => {
afterEach(() => {
act(() => root.unmount())
host.remove()
- useProjects.setState({ projects: [], activeProjectId: '' })
})
it('drops a tab before the one it was released on', async () => {
@@ -270,9 +269,7 @@ describe('TabBar options button', () => {
let host: HTMLElement
beforeEach(async () => {
- ;(globalThis as { ResizeObserver?: unknown }).ResizeObserver = NoopResizeObserver
- Element.prototype.scrollIntoView = (): void => {}
- ;(window as unknown as { nodeTerminal: any }).nodeTerminal = {}
+ const { TabBar, useProjects } = await load()
host = document.createElement('div')
document.body.appendChild(host)
useProjects.setState({
@@ -302,7 +299,6 @@ describe('TabBar options button', () => {
afterEach(() => {
act(() => root.unmount())
host.remove()
- useProjects.setState({ projects: [], activeProjectId: '' })
})
it('sits on every tab, so the menu is reachable without activating it first', () => {