-
Notifications
You must be signed in to change notification settings - Fork 508
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
Cannot set custom jest.config.{js,ts} even with --config flag in test CLI command #150
Comments
@SeedyROM @jaredpalmer I'm taking a quick look at this and I'm unsure what would be the correct fix. The easiest is to check if the args already contain a config (here), if it does then don't push the tsdx config. Or do we merge in the contents of the supplied config with the tsdx config? It would probably need to be a deep merge if you need to add in custom transforms into your jest config such as CSS transforms. |
@Aidurber I think a deep merge would be appropriate, but I'm not an expert on this library. So take my opinion with a grain of salt. |
Ran into this myself during some testing (and, notably, TSDX itself uses This same error, Root cause is actually Jest's very bare programmatic API: jestjs/jest#5048 Until Jest's programmatic API becomes better, I do think checking if Also this is related to #100 as |
The same error here. How to fix? |
Current Behavior
The
test
command's--config, -c
flags throw a nondescript error when passed any value.This also doesn't load the
test
command in watch mode as the documentation specified.Expected behavior
Either having a
jest.config.{js,ts}
in the project root or specifying one via the config flag in yourtsdx test
should actually be loaded on setup.Suggested solution(s)
Quickfix:
Just move all your configuration into
package.json
under the "jest" key.Long term fix:
I can't seem to find the bug first thing in index.ts, but this is definitely where things are going wrong.
I will update this issue as I study it more!
Additional context
The example bug repo is available here.
Your environment
The text was updated successfully, but these errors were encountered: