-
Notifications
You must be signed in to change notification settings - Fork 105
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
Replacement of <rootDir> happens too late #153
Comments
Nice catch! Could you submit a PR to fix this and include a test case that makes sure rootDir isn't stripped out? |
Yep, working on it now. Will hopefully have something later today. |
There is more nuance here than what I originally reported. The problem is actually when the outputDirectory looks like In our case, our Jest root directory isn't at the root of the project, but we want the final report to end up in the root. That's why we're using that pattern. The fix suggested above works and is the correct fix, but I wanted to provide a little more detail for what's going on. It was a bit unfair to blame |
I just found this bug after spending too much time why |
The final output location is determined using the following logic:
Unfortunately, the call to
path.join()
scrubs<rootDir>
from the outputDirectory, so any path that uses that syntax ends up incorrect.Tweaking the order to replace
<rootDir>
first solves the problem:The text was updated successfully, but these errors were encountered: