debugger: Fix running JS tests when worktree root and package root do not coincide (#32644)

- construct the correct path to the test library based on the location
of package.json
- run scripts from the package root where they were defined
- run tests in the directory of the defining file

Release Notes:

- Debugger Beta: fixed running JS tests when the worktree root is above
the location of package.json.

---------

Co-authored-by: Anthony <anthony@zed.dev>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This commit is contained in:
Cole Miller 2025-06-13 01:03:07 -04:00 committed by GitHub
parent 9166e66519
commit bcd79331b9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 289 additions and 112 deletions

View file

@ -278,7 +278,7 @@ impl language::LanguageToolchainStore for RemoteStore {
}
}
pub(crate) struct EmptyToolchainStore;
pub struct EmptyToolchainStore;
#[async_trait(?Send)]
impl language::LanguageToolchainStore for EmptyToolchainStore {
async fn active_toolchain(