mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-10-24 19:27:23 +00:00
test: reset MCP cache mock between cases
This commit is contained in:
parent
fa98a47a01
commit
02c8915833
1 changed files with 6 additions and 0 deletions
|
|
@ -228,6 +228,12 @@ describe('MCP Routes', () => {
|
|||
currentUser = undefined;
|
||||
mockResolveAllMcpConfigs.mockResolvedValue({});
|
||||
mockResolveMcpConfigNames.mockResolvedValue([]);
|
||||
// `clearAllMocks` preserves queued `mockReturnValueOnce` entries. A callback
|
||||
// test can legitimately leave one unconsumed, which then masks a later test's
|
||||
// default implementation when this file shares a CI shard with other suites.
|
||||
// Reset the cache accessor itself so every test starts from a deterministic
|
||||
// default and can opt into a one-shot value deliberately.
|
||||
require('~/cache').getLogStores.mockReset().mockReturnValue({});
|
||||
const { MCPOAuthHandler } = require('@librechat/api');
|
||||
const { getTenantId } = require('@librechat/data-schemas');
|
||||
getTenantId.mockReturnValue(undefined);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue