mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-23 13:23:04 +00:00
fix(ci): parse errors, two leaky tests and the lint ratchets after the parity round
This commit is contained in:
@@ -11,7 +11,7 @@ import type { AiStatusResponse } from '@trek/shared';
|
||||
import { useLocation } from 'react-router';
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
|
||||
import { act, fireEvent, render, screen, waitFor } from '../../../tests/helpers/render';
|
||||
import { act, cleanup, fireEvent, render, screen, waitFor } from '../../../tests/helpers/render';
|
||||
import { tripRepo } from '../../repo/tripRepo';
|
||||
import { chatOf, useAssistantStore } from '../../store/assistantStore';
|
||||
import type { Trip } from '../../types';
|
||||
@@ -104,6 +104,9 @@ beforeEach(() => {
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
// Unmounted before the store gets its real actions back: a window still on screen would ask the real
|
||||
// loadStatus, whose failed request lands in a later case and hides the assistant there (status null).
|
||||
cleanup();
|
||||
useAssistantStore.setState(INITIAL, true);
|
||||
vi.restoreAllMocks();
|
||||
vi.clearAllMocks();
|
||||
|
||||
@@ -200,6 +200,6 @@ export function useAiConnections({ phone = false }: { phone?: boolean } = {}) {
|
||||
canOpen: status?.available === true,
|
||||
openAssistant,
|
||||
isAdmin,
|
||||
openAdmin: () => navigate('/admin?tab=addons'),
|
||||
openAdmin: () => void navigate('/admin?tab=addons'),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user