Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

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

Maurice9383ac63a8e3
diff --git a/client/scripts/lib/format.mjs b/client/scripts/lib/format.mjs
index 1007e858e..26d5224e6 100644
--- a/client/scripts/lib/format.mjs
+++ b/client/scripts/lib/format.mjs
@@ -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;
}
}
diff --git a/server/tests/unit/nest/assistant/cards/journey/journey-cards.test.ts b/server/tests/unit/nest/assistant/cards/journey/journey-cards.test.ts
index 46ce1ccf7..134d3e536 100644
--- a/server/tests/unit/nest/assistant/cards/journey/journey-cards.test.ts
+++ b/server/tests/unit/nest/assistant/cards/journey/journey-cards.test.ts
@@ -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);
});
});
diff --git a/server/tests/unit/trips/trips.rpc.test.ts b/server/tests/unit/trips/trips.rpc.test.ts
index edbe075bf..c0075df13 100644
--- a/server/tests/unit/trips/trips.rpc.test.ts
+++ b/server/tests/unit/trips/trips.rpc.test.ts
@@ -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();