You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's not possible to use .ts setup/teardown file for global setup/teardown.
Jest has globalSetup and globalTeardown options which you can use for global setup/teardown but with ts-jest you can not use .ts files for setup.
As I understand with this configuration ts-jest perform in memory transpiling of the .ts files. I have outDir option in compilerOptions of my tsconfig.json, but nothing is written in that outDir and because I cann't use transpiled jest-config.js for use in globalSetup option.
@asemidotsky there was a discussion in #411 on this. I'm not sure how this can be fixed in ts-jest which can only transpile code that Jest passes to it.
I'm closing this but if my understanding is incorrect, it can be reopened and re-looked at
It's not possible to use .ts setup/teardown file for global setup/teardown.
Jest has
globalSetup
andglobalTeardown
options which you can use for global setup/teardown but with ts-jest you can not use .ts files for setup.I have Jest configuration in package.json:
As I understand with this configuration ts-jest perform in memory transpiling of the .ts files. I have
outDir
option incompilerOptions
of mytsconfig.json
, but nothing is written in that outDir and because I cann't use transpiled jest-config.js for use in globalSetup option.Set options in config like this:
My question about this at StackOverflow
The text was updated successfully, but these errors were encountered: