style: run prettier formatter over src and tests

This commit is contained in:
2026-06-11 20:46:00 +05:30
parent 2389d4f297
commit 6b564a4569
211 changed files with 6134 additions and 4234 deletions
+13 -2
View File
@@ -15,7 +15,13 @@ vi.mock('@/lib/ipc', () => ({
describe('FileTree', () => {
beforeEach(() => {
useFileStore.setState({ tree: null, rootPath: null, expanded: new Set(), openTabs: [], activeTabId: null });
useFileStore.setState({
tree: null,
rootPath: null,
expanded: new Set(),
openTabs: [],
activeTabId: null,
});
});
it('renders nothing when tree is null', () => {
@@ -66,7 +72,12 @@ describe('FileTree', () => {
isDirectory: true,
loaded: true,
children: [
{ name: 'index.ts', path: '/project/src/index.ts', isDirectory: false, children: null },
{
name: 'index.ts',
path: '/project/src/index.ts',
isDirectory: false,
children: null,
},
],
},
],
@@ -55,7 +55,9 @@ describe('GitStatusPanel', () => {
useFileStore.setState({ rootPath: '/project' } as any);
render(<GitStatusPanel />);
// The helper text appears in a <p> element distinct from the error heading
expect(await screen.findByText('Not a git repository, or git not installed.')).toBeInTheDocument();
expect(
await screen.findByText('Not a git repository, or git not installed.')
).toBeInTheDocument();
});
it('opens file on click', async () => {
@@ -70,4 +72,4 @@ describe('GitStatusPanel', () => {
await userEvent.click(row);
expect(openFile).toHaveBeenCalledWith('/project/a.md');
});
});
});
+10 -2
View File
@@ -20,7 +20,13 @@ vi.mock('@/lib/ipc', () => ({
describe('Sidebar', () => {
beforeEach(() => {
useFileStore.setState({ tree: null, rootPath: null, expanded: new Set(), openTabs: [], activeTabId: null });
useFileStore.setState({
tree: null,
rootPath: null,
expanded: new Set(),
openTabs: [],
activeTabId: null,
});
useEditorStore.setState({ buffers: new Map(), activeId: null });
});
@@ -46,7 +52,9 @@ describe('Sidebar', () => {
path: '/project',
isDirectory: true,
loaded: true,
children: [{ name: 'README.md', path: '/project/README.md', isDirectory: false, children: null }],
children: [
{ name: 'README.md', path: '/project/README.md', isDirectory: false, children: null },
],
},
rootPath: '/project',
});