# debugger: Fix running JS tests when worktree root and package root do not coincide \(\#32644\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/bcd79331b99c18a1d7f51f9ff55de3da8e87f3bf)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: bcd79331b99c18a1d7f51f9ff55de3da8e87f3bf

Requested commit: bcd79331b99c18a1d7f51f9ff55de3da8e87f3bf

Commit: bcd79331b99c18a1d7f51f9ff55de3da8e87f3bf

Tree: 8f4dbef6b3d246e56520b2c8508a57cded0cb3db

Author: Cole Miller

Committer: GitHub

## Message

```
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>
```

## Parents

- [9166e66519cd39663ce26ab7912db46a39e66adb](https://git.cafe/gitcafe/zed/commit/9166e66519cd39663ce26ab7912db46a39e66adb?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/bcd79331b99c18a1d7f51f9ff55de3da8e87f3bf?format=markdown)
