mirror of
https://github.com/modelcontextprotocol/servers.git
synced 2026-04-17 23:53:24 +02:00
Migrate sequentialthinking and filesystem servers from Jest to Vitest
- Replace Jest dependencies with Vitest and @vitest/coverage-v8 - Update test scripts to use 'vitest run --coverage' - Create vitest.config.ts for both servers with node environment and coverage settings - Update all test files: - Change imports from '@jest/globals' to 'vitest' - Replace jest.mock() with vi.mock() - Replace jest.fn() with vi.fn() - Update mock clearing/restoring to use vi methods - Remove jest.config.cjs files - All 151 tests passing (24 in sequentialthinking, 127 in filesystem) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { describe, it, expect, beforeEach, jest } from '@jest/globals';
|
||||
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
|
||||
import { SequentialThinkingServer, ThoughtData } from '../lib.js';
|
||||
|
||||
// Mock chalk to avoid ESM issues in Jest
|
||||
jest.mock('chalk', () => {
|
||||
// Mock chalk to avoid ESM issues
|
||||
vi.mock('chalk', () => {
|
||||
const chalkMock = {
|
||||
yellow: (str: string) => str,
|
||||
green: (str: string) => str,
|
||||
@@ -10,7 +10,6 @@ jest.mock('chalk', () => {
|
||||
};
|
||||
return {
|
||||
default: chalkMock,
|
||||
__esModule: true,
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user