Skip to content

Add test file pattern matching parent dirs related tests#1334

Merged
Saga4 merged 3 commits intomainfrom
fix/test-file-pattern-matching-parent-dirs
Feb 9, 2026
Merged

Add test file pattern matching parent dirs related tests#1334
Saga4 merged 3 commits intomainfrom
fix/test-file-pattern-matching-parent-dirs

Conversation

@Saga4
Copy link
Contributor

@Saga4 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>
@Saga4 Saga4 changed the title fix/test file pattern matching parent dirs Add test file pattern matching parent dirs related tests Feb 3, 2026
@Saga4 Saga4 merged commit 67b48be into main Feb 9, 2026
15 of 27 checks passed
@Saga4 Saga4 deleted the fix/test-file-pattern-matching-parent-dirs branch February 9, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant