update UI

This commit is contained in:
Joe Danziger
2025-05-27 17:22:45 -04:00
parent 939de7f3f8
commit 03f2c13f1e
2 changed files with 20 additions and 6 deletions

View File

@@ -11,12 +11,21 @@ import { removeTaskMasterMCPConfiguration } from '../../../src/utils/mcp-config-
const mockLog = {
info: jest.fn(),
error: jest.fn(),
debug: jest.fn()
debug: jest.fn(),
warn: jest.fn()
};
// Mock the logger import
jest.mock('../../../scripts/modules/utils.js', () => ({
log: (level, message) => mockLog[level]?.(message)
log: jest.fn((level, ...args) => {
// Handle the log function more robustly to avoid JSON parsing issues in tests
const mockFn = mockLog[level] || jest.fn();
// Convert objects to strings safely for testing
const safeArgs = args.map(arg =>
typeof arg === 'object' ? '[Object]' : String(arg)
);
return mockFn(...safeArgs);
})
}));
describe('Selective Rules Removal', () => {