-
Notifications
You must be signed in to change notification settings - Fork 2
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
I think Jest converter needs <rootDir>/
prefix?
#5
Comments
Hey, @moltar. Thanks for this suggestion. I've used You're right, we are prepending the dotalias/src/converters/toJestConfig.ts Lines 54 to 56 in 45d6f43
Do you experience an issue because of this logic? Could you please share your entire |
I was calling the fn programmatically. So I guess it's an undocumented use case 😀 |
Can you share how you're calling it? |
import { toJestConfig } from 'dotalias/lib/converters/toJestConfig'
const paths: Record<string, string> = {
bar: './../bar/src'
}
toJestConfig(paths).moduleNameMapper |
Ok, I do see that there is logic to prepend this, based on the prefix.
If the path is
./
then<rootDir>/
is added.However, this doesn't seem to work in my case:
Given
../bar/src
=>../bar/src
is produced ✅./../bar/src
=>bar/src
is produced 🚫The text was updated successfully, but these errors were encountered: