mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-21 09:46:12 +01:00
🧪 ci: Update PermissionService tests for PromptGroup resource type
- Refactor tests to use PromptGroup roles instead of Project roles. - Initialize models and seed default roles in test setup. - Update error handling for non-existent resource types. - Ensure proper cleanup of test data while retaining seeded roles.
This commit is contained in:
parent
fc8fd489d6
commit
90b037a67f
5 changed files with 66 additions and 99 deletions
|
|
@ -4,12 +4,10 @@ import userEvent from '@testing-library/user-event';
|
|||
import '@testing-library/jest-dom';
|
||||
import SearchBar from '../SearchBar';
|
||||
|
||||
// Mock useLocalize hook
|
||||
jest.mock('~/hooks/useLocalize', () => () => (key: string) => key);
|
||||
|
||||
// Mock useDebounce hook
|
||||
// Mock hooks
|
||||
jest.mock('~/hooks', () => ({
|
||||
useDebounce: (value: string) => value, // Return value immediately for testing
|
||||
useLocalize: () => (key: string) => key,
|
||||
}));
|
||||
|
||||
describe('SearchBar', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue