chore(format): run prettier over src/ and scripts/
Formatting was configured but never enforced: `bun run format:check` reported 199 unformatted files and ran in no workflow and in no git hook, so .prettierrc (printWidth 100, trailing commas) described an intention rather than the tree. This is the one-time sweep that makes the check gateable. Whitespace and token-reflow only -- no behavioural change: `bun run check` reports 0 errors and all 1053 frontend tests pass before and after. Kept out of every other commit on purpose. A 199-file diff mixed with real changes is unreviewable, and the next commit turns format:check into a hard CI gate so this cannot silently accumulate again.
This commit is contained in:
@@ -51,9 +51,7 @@ describe("favorites service", () => {
|
||||
|
||||
await toggleFavorite("item-123", false);
|
||||
|
||||
const call = invokeSpy.mock.calls.find(
|
||||
(c) => c[0] === "storage_toggle_favorite"
|
||||
);
|
||||
const call = invokeSpy.mock.calls.find((c) => c[0] === "storage_toggle_favorite");
|
||||
expect(call).toBeDefined();
|
||||
expect(call![1]).toHaveProperty("itemId", "item-123");
|
||||
expect(call![1]).toHaveProperty("isFavorite", true);
|
||||
@@ -65,9 +63,7 @@ describe("favorites service", () => {
|
||||
|
||||
await toggleFavorite("item-123", false);
|
||||
|
||||
const call = invokeSpy.mock.calls.find(
|
||||
(c) => c[0] === "storage_toggle_favorite"
|
||||
);
|
||||
const call = invokeSpy.mock.calls.find((c) => c[0] === "storage_toggle_favorite");
|
||||
expect(call![1]).toHaveProperty("userId", "user-123");
|
||||
});
|
||||
|
||||
@@ -105,9 +101,7 @@ describe("favorites service", () => {
|
||||
|
||||
await toggleFavorite("item-123", false);
|
||||
|
||||
const markSyncedCall = invokeSpy.mock.calls.find(
|
||||
(c) => c[0] === "storage_mark_synced"
|
||||
);
|
||||
const markSyncedCall = invokeSpy.mock.calls.find((c) => c[0] === "storage_mark_synced");
|
||||
expect(markSyncedCall).toBeDefined();
|
||||
expect(markSyncedCall![1]).toHaveProperty("itemId", "item-123");
|
||||
});
|
||||
@@ -117,9 +111,7 @@ describe("favorites service", () => {
|
||||
const authModule = vi.mocked(auth);
|
||||
authModule.getUserId = vi.fn(() => null);
|
||||
|
||||
await expect(toggleFavorite("item-123", false)).rejects.toThrow(
|
||||
"Not authenticated"
|
||||
);
|
||||
await expect(toggleFavorite("item-123", false)).rejects.toThrow("Not authenticated");
|
||||
});
|
||||
|
||||
it("should handle server sync failure gracefully", async () => {
|
||||
|
||||
Reference in New Issue
Block a user