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
+1 -1
View File
@@ -90,4 +90,4 @@ describe('AppHeader', () => {
await userEvent.click(screen.getByRole('button', { name: /^about$/i }));
expect(useAppStore.getState().modal).toEqual({ kind: 'about' });
});
});
});
+7 -2
View File
@@ -12,7 +12,12 @@ vi.mock('@/components/ui/resizable', () => ({
</div>
),
ResizablePanel: ({ children, defaultSize, minSize, maxSize }: any) => (
<div data-testid="resizable-panel" data-size={defaultSize} data-min={minSize} data-max={maxSize}>
<div
data-testid="resizable-panel"
data-size={defaultSize}
data-min={minSize}
data-max={maxSize}
>
{children}
</div>
),
@@ -46,4 +51,4 @@ describe('AppShell', () => {
);
expect(screen.queryByText(/file tree placeholder/i)).not.toBeInTheDocument();
});
});
});
+27 -5
View File
@@ -9,8 +9,15 @@ describe('Breadcrumb', () => {
beforeEach(() => {
localStorage.clear();
useSettingsStore.setState({ ...useSettingsStore.getInitialState(), breadcrumbSymbols: true });
useFileStore.setState({ activeTabId: '/test.md', openTabs: [{ id: '/test.md', path: '/test.md', title: 'test.md', dirty: false }] } as any);
useEditorStore.setState({ buffers: new Map([['/test.md', { id: '/test.md', path: '/test.md', content: '# H1\n## H2', dirty: false }]]) } as any);
useFileStore.setState({
activeTabId: '/test.md',
openTabs: [{ id: '/test.md', path: '/test.md', title: 'test.md', dirty: false }],
} as any);
useEditorStore.setState({
buffers: new Map([
['/test.md', { id: '/test.md', path: '/test.md', content: '# H1\n## H2', dirty: false }],
]),
} as any);
});
it('shows "No file selected" when no tab is active', () => {
@@ -38,8 +45,23 @@ describe('Breadcrumb', () => {
});
it('limits heading symbols to 3', () => {
useFileStore.setState({ activeTabId: '/test.md', openTabs: [{ id: '/test.md', path: '/test.md', title: 'test.md', dirty: false }] } as any);
useEditorStore.setState({ buffers: new Map([['/test.md', { id: '/test.md', path: '/test.md', content: '# H1\n## H2\n### H3\n#### H4', dirty: false }]]) } as any);
useFileStore.setState({
activeTabId: '/test.md',
openTabs: [{ id: '/test.md', path: '/test.md', title: 'test.md', dirty: false }],
} as any);
useEditorStore.setState({
buffers: new Map([
[
'/test.md',
{
id: '/test.md',
path: '/test.md',
content: '# H1\n## H2\n### H3\n#### H4',
dirty: false,
},
],
]),
} as any);
render(<Breadcrumb />);
// Should show H1, H2, H3 but not H4
expect(screen.getByText(/# H1/)).toBeInTheDocument();
@@ -47,4 +69,4 @@ describe('Breadcrumb', () => {
expect(screen.getByText(/# H3/)).toBeInTheDocument();
expect(screen.queryByText(/# H4/)).not.toBeInTheDocument();
});
});
});
+1 -1
View File
@@ -7,4 +7,4 @@ describe('StatusBar', () => {
render(<StatusBar />);
expect(screen.getByText(/0 words/i)).toBeInTheDocument();
});
});
});
+1 -3
View File
@@ -81,9 +81,7 @@ describe('TabBar', () => {
it('renders a dirty indicator when dirty === true', () => {
useFileStore.setState({
openTabs: [
{ id: '/tmp/foo.md', path: '/tmp/foo.md', title: 'foo.md', dirty: true },
],
openTabs: [{ id: '/tmp/foo.md', path: '/tmp/foo.md', title: 'foo.md', dirty: true }],
activeTabId: '/tmp/foo.md',
});
render(<TabBar />);