mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-03 01:28:55 +00:00
fix(ci): a line break in the format check, and two test type errors
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user