Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

refactor(index.test.js): change let to const for variables that are not reassigned

Daniel Avilaf17162894881
diff --git a/api/app/langchain/tools/index.test.js b/api/app/langchain/tools/index.test.js
index 9c2c73b7f1..e2917cad07 100644
--- a/api/app/langchain/tools/index.test.js
+++ b/api/app/langchain/tools/index.test.js
@@ -12,12 +12,11 @@ const GoogleSearchAPI = require('./GoogleSearch');
describe('Tool Handlers', () => {
let fakeUser;
- let pluginKey = 'dall-e';
- let pluginKey2 = 'wolfram';
- let initialTools = [pluginKey, pluginKey2];
- let sampleTools = initialTools;
- let ToolClass = OpenAICreateImage;
- let mockCredential = 'mock-credential';
+ const pluginKey = 'dall-e';
+ const pluginKey2 = 'wolfram';
+ const initialTools = [pluginKey, pluginKey2];
+ const ToolClass = OpenAICreateImage;
+ const mockCredential = 'mock-credential';
const mainPlugin = availableTools.find((tool) => tool.pluginKey === pluginKey);
const authConfigs = mainPlugin.authConfig;
@@ -93,7 +92,7 @@ describe('Tool Handlers', () => {
let loadTool1;
let loadTool2;
let loadTool3;
- sampleTools = [...sampleTools, 'calculator'];
+ const sampleTools = [...initialTools, 'calculator'];
let ToolClass2 = Calculator;
let remainingTools = availableTools.filter(
(tool) => sampleTools.indexOf(tool.pluginKey) === -1