Add test file pattern matching parent dirs related tests#1334
Merged
Conversation
Contributor
Saga4
commented
Feb 3, 2026
- fix: prevent false positive test file detection for projects in /tests/ folders
- Add tests for project-inside-tests-folder fix
Adds two regression tests to verify that source files are not incorrectly filtered when the project is located inside a folder named "tests": 1. test_filter_functions_project_inside_tests_folder - Tests basic scenario: /home/user/tests/myproject/ - Verifies source files in src/ and project root are kept - Verifies actual test files in test/ directory are filtered 2. test_filter_functions_typescript_project_in_tests_folder - Tests TypeScript monorepo scenario: /home/user/tests/n8n/packages/ - Simulates the n8n project structure that exposed this bug - Verifies deep nested source files are kept - Verifies test files in test/ directories are filtered These tests ensure the fix works correctly by checking that directory pattern matching (e.g., /tests/) only applies to paths relative to project_root, not to the full absolute path. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.