Add tests for memory server, fix filesystem tests, and move testing guidelines#2924
Merged
olaservo merged 10 commits intomodelcontextprotocol:mainfrom Oct 29, 2025
Merged
Conversation
Addresses PR modelcontextprotocol#2884 feedback to move testing guidelines from AGENTS.md into CONTRIBUTING.md where both humans and agents will see it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…into update-tests-and-markdown-files
These files are no longer necessary as the testing guidelines are now documented in CONTRIBUTING.md where both humans and agents will naturally find them. This addresses the PR modelcontextprotocol#2884 reviewer feedback that agents already read README and CONTRIBUTING files, making a separate AGENTS.md redundant and creating unnecessary maintenance overhead. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…into update-tests-and-markdown-files
…import The afterEach function was used in the test file but not imported from vitest, causing a build failure. This was introduced in PR modelcontextprotocol#2851. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
The test was expecting forward slashes to always be converted to backslashes, but normalizePath() only does this on Windows (process.platform === 'win32'). On Linux/Unix, forward slashes are preserved. Improved the fix by: 1. Removing relative path assertion from the "as is" test since it doesn't match intent 2. Adding a dedicated test that validates platform-specific behavior naturally without mocking 3. Using the actual platform instead of unreliable Object.defineProperty mocking This approach is more reliable and clearly documents expected behavior per platform. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…olaservo/servers into update-tests-and-markdown-files
domdomegg
approved these changes
Oct 29, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds comprehensive test coverage for the memory server. Additionally, it includes bug fixes and documentation improvements for the testing infrastructure.
Server Details
memory- Added test suite using Vitestfilesystem- Fixed importafterEachimport)Motivation and Context
This PR adds tests covering:
.jsonto.jsonlformatFixed a TypeScript compilation error introduced in PR #2851 where
afterEachwas used but not imported from vitest.Also removed unnecessary agent instructions as suggested by Adam here and moved those testing notes to the Contributing doc instead.
How Has This Been Tested?
Ran tests in CI
Breaking Changes
No breaking changes.
Types of changes
Checklist