fix(ci): a line break in the format check, and two test type errors

This commit is contained in:
Maurice
2026-10-22 17:32:27 +02:00
parent 9b08da8e0b
commit 9383ac63a8
3 changed files with 3 additions and 4 deletions
+1 -2
View File
@@ -32,8 +32,7 @@ export async function isFormatted(path) {
try {
return await prettier.check(readText(path), { ...options, filepath: path });
} catch (err) {
stopped.set(path, String(err instanceof Error ? err.message : err).split('
')[0]);
stopped.set(path, String(err instanceof Error ? err.message : err).split('\n')[0]);
return false;
}
}
@@ -361,7 +361,7 @@ describe('the applied change', () => {
expect(ASSISTANT_WRITE_TOOLS.update_journey_entry?.verbKey).toBe('updateJournalEntry');
expect(ASSISTANT_WRITE_TOOLS.delete_journey_entry?.verbKey).toBe('removeJournalEntry');
expect(ASSISTANT_UNDO_MAP.update_journey_entry).toBeUndefined();
expect(CARD_PROMPT_LINES).toEqual(expect.arrayContaining(JOURNEY_CARDS.prompt ?? []));
expect(CARD_PROMPT_LINES).toEqual(expect.arrayContaining([...(JOURNEY_CARDS.prompt ?? [])]));
expect(JOURNEY_CARDS.prompt).toHaveLength(1);
});
});
+1 -1
View File
@@ -337,7 +337,7 @@ describe('TripsRpc membership', () => {
it('TRIPS-RPC-021 a join that changes nothing announces nothing', async () => {
const f = build();
f.membership.joinTripAsMember.mockResolvedValueOnce({ joined: false, tripId: 1 });
vi.mocked(f.membership.joinTripAsMember).mockResolvedValueOnce({ joined: false, tripId: 1 });
expect((await f.host().dispatch(req('trips.addMember', { tripId: 1, userId: 7 }), 42)).ok).toBe(true);
expect(f.roster.findMember).not.toHaveBeenCalled();
expect(f.realtime.broadcast).not.toHaveBeenCalled();