Skip to content
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

preserveSymlinks doesn't work in jest #1807

Open
8 tasks
bdemann opened this issue Jun 4, 2024 · 0 comments
Open
8 tasks

preserveSymlinks doesn't work in jest #1807

bdemann opened this issue Jun 4, 2024 · 0 comments

Comments

@bdemann
Copy link
Member

bdemann commented Jun 4, 2024

A few of our test examples use the tests from other examples and the simplest way to make sure that everything is installed properly is to preserve symlinks, however there doesn't seem to currently be support for preserving sym links with jest.

We are working on developing a work around until this issue can be resolved in jest, though it's unclear if or when that will happen. Here are some PRs and issues pertaining to the subject.

kulshekhar/ts-jest#825
jestjs/jest#9976
jestjs/jest#7364
jestjs/jest#5356

We tried using a work around like in this gist (which I guess would be a jest gist) (and there was a similar one in jestjs/jest#5356)
https://gist.github.com/gcangussu/af52da296aef829eba15ea626453f031

but the resolver was unable to figure out es modules and we didn't want to invest the resources at this exact moment into figuring that out.

  • Add "allowSyntheticDefaultImports": true to the affected tsconfigs as soon as this is resolved
    • all of the class based syntax examples
    • bitcoin_psbt
    • bitcoinjs_lib
    • sqlite_drizzle
    • sqlite_typeorm
    • That should be all of them, but it should be any project that has the pretest with the linkAndInstallPatch call
  • add "allowSyntheticDefaultImports": true to the build options in compile_typescript_code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant