fix: allow test runner to discover tests in nested directories #12
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.
Fix for Issue stdlib-js#2096
Problem
The test workflow was not running tests located in nested directories within package test folders. This was happening because the
run_affected_testsscript was using the-maxdepth 2parameter withfind, which limited the search depth and prevented finding test files in subdirectories of the test folder.Solution
Removed the
-maxdepth 2restriction from thefindcommand in therun_affected_testsscript. Now the test runner will properly discover and run all test files, including those in nested directories.Test Results
To verify this fix works:
This demonstrates that the fix correctly finds test files in nested directories.
Testing Instructions
The output of the tests above is as follows:
This fix ensures that the CI workflow will now catch issues in tests located in nested directories, which was the problem identified in issue stdlib-js#2096.