Switch to double quotes and reformat codebase with Biome

This commit is contained in:
Mohamed Boudra
2026-03-21 20:22:15 +07:00
parent ab40786882
commit f6579dbeb4
805 changed files with 38132 additions and 40175 deletions
@@ -1,53 +1,53 @@
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from "vitest";
import {
resolveWorkspaceHeader,
shouldRenderMissingWorkspaceDescriptor,
} from './workspace-header-source'
import { buildSidebarProjectsFromWorkspaces } from '@/hooks/use-sidebar-workspaces-list'
import type { WorkspaceDescriptor } from '@/stores/session-store'
} from "./workspace-header-source";
import { buildSidebarProjectsFromWorkspaces } from "@/hooks/use-sidebar-workspaces-list";
import type { WorkspaceDescriptor } from "@/stores/session-store";
describe('workspace source of truth consumption', () => {
it('uses the same descriptor name in header and sidebar row', () => {
describe("workspace source of truth consumption", () => {
it("uses the same descriptor name in header and sidebar row", () => {
const workspace: WorkspaceDescriptor = {
id: '/repo/main',
projectId: 'remote:github.com/getpaseo/paseo',
projectDisplayName: 'getpaseo/paseo',
projectRootPath: '/repo/main',
projectKind: 'git',
workspaceKind: 'local_checkout',
name: 'feat/workspace-sot',
status: 'running',
activityAt: new Date('2026-03-01T00:00:00.000Z'),
id: "/repo/main",
projectId: "remote:github.com/getpaseo/paseo",
projectDisplayName: "getpaseo/paseo",
projectRootPath: "/repo/main",
projectKind: "git",
workspaceKind: "local_checkout",
name: "feat/workspace-sot",
status: "running",
activityAt: new Date("2026-03-01T00:00:00.000Z"),
diffStat: null,
}
};
const header = resolveWorkspaceHeader({ workspace })
const header = resolveWorkspaceHeader({ workspace });
const sidebarProjects = buildSidebarProjectsFromWorkspaces({
serverId: 'srv',
serverId: "srv",
workspaces: [workspace],
projectOrder: [],
workspaceOrderByScope: {},
})
});
expect(header.title).toBe('feat/workspace-sot')
expect(header.subtitle).toBe('getpaseo/paseo')
expect(sidebarProjects[0]?.workspaces[0]?.name).toBe(header.title)
expect(sidebarProjects[0]?.workspaces[0]?.statusBucket).toBe('running')
})
expect(header.title).toBe("feat/workspace-sot");
expect(header.subtitle).toBe("getpaseo/paseo");
expect(sidebarProjects[0]?.workspaces[0]?.name).toBe(header.title);
expect(sidebarProjects[0]?.workspaces[0]?.statusBucket).toBe("running");
});
it('renders explicit missing state only after workspace hydration', () => {
it("renders explicit missing state only after workspace hydration", () => {
expect(
shouldRenderMissingWorkspaceDescriptor({
workspace: null,
hasHydratedWorkspaces: true,
})
).toBe(true)
}),
).toBe(true);
expect(
shouldRenderMissingWorkspaceDescriptor({
workspace: null,
hasHydratedWorkspaces: false,
})
).toBe(false)
})
})
}),
).toBe(false);
});
});