mirror of
https://github.com/amitwh/markdown-converter.git
synced 2026-08-02 18:10:18 +05:30
style: run prettier formatter over src and tests
This commit is contained in:
@@ -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');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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',
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user