feat: add Jest testing framework and CI/CD configuration (#187)

Co-authored-by: samanhappy@qq.com <my6051199>
This commit is contained in:
samanhappy
2025-06-18 14:02:52 +08:00
committed by GitHub
parent 1bd4fd6d9c
commit 1e308ec4c5
19 changed files with 1332 additions and 41 deletions

View File

@@ -1,5 +1,5 @@
import { v4 as uuidv4 } from 'uuid';
import { IGroup, McpSettings } from '../types/index.js';
import { IGroup } from '../types/index.js';
import { loadSettings, saveSettings } from '../config/index.js';
import { notifyToolChanged } from './mcpService.js';

View File

@@ -1,5 +1,4 @@
// filepath: /Users/sunmeng/code/github/mcphub/src/services/logService.ts
import { spawn, ChildProcess } from 'child_process';
import { EventEmitter } from 'events';
import * as os from 'os';
import * as process from 'process';
@@ -157,7 +156,7 @@ class LogService {
if (sourcePidMatch) {
// If we have a 'source-processId' format in the second bracket
const [_, source, extractedProcessId] = sourcePidMatch;
const [_, source, _extractedProcessId] = sourcePidMatch;
return {
text: remainingText.trim(),
source: source.trim(),

View File

@@ -476,7 +476,7 @@ export const getAllVectorizedTools = async (
*/
export const removeServerToolEmbeddings = async (serverName: string): Promise<void> => {
try {
const vectorRepository = getRepositoryFactory(
const _vectorRepository = getRepositoryFactory(
'vectorEmbeddings',
)() as VectorEmbeddingRepository;