style: apply prettier across fork files
check:prettier was not part of my gate routine, so formatting drift accumulated across the session's touched files (and a few older ones). Run prettier --write to bring the repo back to 'All matched files use Prettier code style!'. Formatting only — no logic changes. tsc/tests/build all green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -18,7 +18,7 @@ test('addRecentSticker prepends a new sticker', () => {
|
||||
const out = addRecentSticker([st('a'), st('b')], st('c'));
|
||||
assert.deepEqual(
|
||||
out.map((s) => s.url),
|
||||
['c', 'a', 'b']
|
||||
['c', 'a', 'b'],
|
||||
);
|
||||
});
|
||||
|
||||
@@ -26,7 +26,7 @@ test('addRecentSticker de-dupes by url, moving the existing one to the front', (
|
||||
const out = addRecentSticker([st('a'), st('b'), st('c')], st('c'));
|
||||
assert.deepEqual(
|
||||
out.map((s) => s.url),
|
||||
['c', 'a', 'b']
|
||||
['c', 'a', 'b'],
|
||||
);
|
||||
assert.equal(out.length, 3);
|
||||
});
|
||||
@@ -36,7 +36,7 @@ test('addRecentSticker caps the list at max (newest kept)', () => {
|
||||
const out = addRecentSticker(start, st('d'), 3);
|
||||
assert.deepEqual(
|
||||
out.map((s) => s.url),
|
||||
['d', 'a', 'b']
|
||||
['d', 'a', 'b'],
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ export const recentStickersAtom = atom(
|
||||
const prevList = Array.isArray(prev) ? prev : [];
|
||||
return typeof updater === 'function' ? updater(prevList) : updater;
|
||||
});
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -42,7 +42,7 @@ export const recentStickersAtom = atom(
|
||||
export const addRecentSticker = (
|
||||
prev: RecentSticker[],
|
||||
sticker: RecentSticker,
|
||||
max = MAX_RECENT_STICKERS
|
||||
max = MAX_RECENT_STICKERS,
|
||||
): RecentSticker[] => {
|
||||
if (!sticker.url) return prev;
|
||||
const withoutDupe = prev.filter((s) => s.url !== sticker.url);
|
||||
|
||||
@@ -46,7 +46,9 @@ test('myMainReceiptPresent: true for a thread_id "main" receipt', () => {
|
||||
});
|
||||
|
||||
test('myMainReceiptPresent: false for a thread-scoped receipt', () => {
|
||||
const event = receiptEvent({ $abc: { 'm.read': { [ME]: { ts: 1, thread_id: '$root:server' } } } });
|
||||
const event = receiptEvent({
|
||||
$abc: { 'm.read': { [ME]: { ts: 1, thread_id: '$root:server' } } },
|
||||
});
|
||||
assert.equal(myMainReceiptPresent(event, ME), false);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user