-
Notifications
You must be signed in to change notification settings - Fork 561
Fix result folder path to work for vscode and npm terminal runs #26092
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes an issue where integration test results were being placed in different directories depending on whether tests were run via npm (from package root) or the VS Code test runner (from test directory). The solution detects the current working directory and constructs the appropriate path to ensure results are consistently placed in the same root integration-test-results directory.
Key Changes
- Replaced hardcoded path with a dynamic
getResultsFolderPath()function - Added logic to detect execution context based on
process.cwd() - Added
joinimport fromnode:pathfor proper path construction
|
@microsoft-github-policy-service agree company="Microsoft" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
|
@microsoft-github-policy-service agree |
Description
In tree-agent-langchain, when running integration tests the results are placed in different paths as the code currently doesn't handle having different working directories. This change figures out the the dirname using the new added file and adds the dir
integration-test-resultsdirectory so that the test results can be written there. (Had to add../../src/test/integration-test-resultsbecause the tests actually get run in lib/test not src/test.) Note that this dir was always created whenever integration tests were run but was never tracked by git and should continue to not be.Reviewer Guidance
import.meta.urlbut that wasn't defined in CommonJS. Tried directly using__dirnamebut that isn't defined in ESMdirname.cjsfile that exports the dirname properly.