test: stub store.isTemporary in useFileHandling test mocks

Previous commit added `useRecoilValue(store.isTemporary)` to the
hook. The test file mocks `~/store` with only `ephemeralAgentByConvoId`
and does not stub `useRecoilValue`, so all 7 cases threw
"Invalid argument to useRecoilValue: expected an atom or selector but
got undefined". Add a stub default export with `isTemporary` and a
`useRecoilValue` mock returning `false`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Aron Gates 2026-05-08 14:56:27 -04:00
parent 7e937df05a
commit eb1609537d
No known key found for this signature in database
GPG key ID: 4F5BDD01E0CFE2A0

View file

@ -30,9 +30,12 @@ jest.mock('@librechat/client', () => ({
jest.mock('recoil', () => ({
...jest.requireActual('recoil'),
useSetRecoilState: jest.fn(() => jest.fn()),
useRecoilValue: jest.fn(() => false),
}));
jest.mock('~/store', () => ({
__esModule: true,
default: { isTemporary: { key: 'isTemporary' } },
ephemeralAgentByConvoId: jest.fn(() => ({ key: 'mock' })),
}));