mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-25 22:27:32 +00:00
fix(ci): bring the per-trip addon tests and ratchets in step
The second run of #3157 was red in six jobs: - Server types: ReminderJobsService takes AddonsService now; RJOB-007 built it with five arguments. - Server tests 2/10: the doc-sync job tests stubbed AddonsService without isEnabledForTrip, which the sync asks per trip now. - Client tests 4/10: toursPermissions mocked useAuthStore as a bare selector; tripAddonsStore keys its lists by account through getState. - Server lint (knip): TripAddonRow was exported without a reader outside its file. - Client lint and Client types: no-unused-vars and the strict errors in useTripPlanner.ts went down by one, so their entries are lowered.
This commit is contained in:
@@ -23,7 +23,7 @@ const state = vi.hoisted(() => ({
|
||||
}))
|
||||
|
||||
vi.mock('../../store/tripStore', () => ({ useTripStore: (selector: (store: unknown) => unknown) => selector({ trip: state.trip, loadTrip: state.loadTrip, refreshPlaces: state.refreshPlaces, places: [], packingItems: state.packingItems }) }))
|
||||
vi.mock('../../store/authStore', () => ({ useAuthStore: (selector: (store: unknown) => unknown) => selector({ user: state.user }) }))
|
||||
vi.mock('../../store/authStore', () => ({ useAuthStore: Object.assign((selector: (store: unknown) => unknown) => selector({ user: state.user }), { getState: () => ({ user: state.user }) }) }))
|
||||
vi.mock('../../store/settingsStore', () => ({ useSettingsStore: (selector: (store: unknown) => unknown) => selector({ settings: { distance_unit: 'metric' } }) }))
|
||||
vi.mock('../Map/MapViewAuto', () => ({ MapViewAuto: () => null }))
|
||||
vi.mock('../../repo/tourRepo', () => ({ tourRepo: { importGpx: state.importGpx, previewGpx: state.previewGpx, create: state.create, update: state.update, detail: state.detail } }))
|
||||
|
||||
@@ -26,7 +26,7 @@ const ICONS: Readonly<Record<string, LucideIcon>> = {
|
||||
};
|
||||
|
||||
/** One trip addon as the trip settings list it. */
|
||||
export interface TripAddonRow {
|
||||
interface TripAddonRow {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
|
||||
Reference in New Issue
Block a user