Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork6.6k
Allow jest.config.cts#14070
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Allow jest.config.cts#14070
Uh oh!
There was an error while loading.Please reload this page.
Conversation
mrazauskas commentedApr 16, 2023
Good idea. These are the missing parts:
|
DerTimonius commentedApr 17, 2023
@mrazauskas Thanks for the hints, I added some things now, please tell me if something is missing 🙂 |
mrazauskas commentedApr 17, 2023
Thanks! Did you try running these new e2e tests? To do so, you build the repo and run |
Uh oh!
There was an error while loading.Please reload this page.
DerTimonius commentedApr 18, 2023
Interesting, I ran |
DerTimonius commentedApr 18, 2023
I investigated the failing tests and was able to recognize two separate issues:
I then tried to move it to the back using I don't have any idea how to solve this... |
linux-foundation-easyclabot commentedApr 29, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
netlifybot commentedApr 29, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
✅ Deploy Preview forjestjs ready!Builtwithout sensitive environment variables
To edit notification comments on pull requests, go to yourNetlify site configuration. |
DerTimonius commentedJun 17, 2023
Still trying, but still really have no idea how to fix the issue that the |
karlhorky commentedJun 17, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@DerTimonius can you post a new short summary about what the problem is? From the error message and your conclusions above, it seems like the tests are not running Maybe@mrazauskas can assist...? |
karlhorky commentedJun 17, 2023
One thing that I can see without looking too deeply into it is that you have an Since jest/packages/jest-cli/src/init/__tests__/__fixtures__/has-jest-config-file-cjs/jest.config.cjs Lines 1 to 8 incddd949
|
karlhorky commentedJun 17, 2023
Ah no, I'm wrong about that, |
DerTimonius commentedJun 17, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@karlhorky Sure. The issues I'm currently facing are solely in the new integration tests that were necessary to write. Initially I got an error, telling me that I can't use It appears to me that the normal TypeScript code is not recognized as such - if I change the code to this: constconfig={displayName:'ts-object-config',verbose:true}asConfig.InitialOptions I get almost a different error, telling me that What I tried so far
|
This PR is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
SimenB commentedOct 5, 2023
Hiya, sorry about the radio silence. Let's get this in 🙂 I tried to merge in |
DerTimonius commentedOct 5, 2023
Hi@SimenB |
DerTimonius commentedOct 5, 2023
Still getting the same errors that I mentioned above (#14070 (comment)) I really don't get this error: writing TS code in a .cts file and it's not recognized... |
This PR is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
| configPath:string, | ||
| ):Promise<Config.InitialOptions>{ | ||
| constisTS=configPath.endsWith(JEST_CONFIG_EXT_TS); | ||
| constisTS=configPath.endsWith(JEST_CONFIG_EXT_TS||JEST_CONFIG_EXT_CTS); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
| constisTS=configPath.endsWith(JEST_CONFIG_EXT_TS||JEST_CONFIG_EXT_CTS); | |
| constisTS= | |
| configPath.endsWith(JEST_CONFIG_EXT_TS)|| | |
| configPath.endsWith(JEST_CONFIG_EXT_CTS); |
@DerTimonius I think this is your issue -cts was never considered
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
oh man. you're right 🙈
implemented this change with the last commit and fixed the tests (all running locally! they did not before, so this is a huge improvement)
SimenB commentedJan 4, 2024
nice! seems like we just need to fix |
DerTimonius commentedJan 4, 2024
Hm, I don't know why the last check is failing. I did not remove the file in question: |
SimenB commentedJan 5, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
|
SimenB left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
thanks!
karlhorky commentedJan 13, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@SimenB@DerTimonius thanks for the PR, review and merge! Look forward to trying this out in a release! Will this be a part of |
karlhorky commentedJan 27, 2024
@SimenB if the next minor or major releases are still going to be pending for a while, what do you think of creating and publishing a new alpha release eg. |
karlhorky commentedFeb 20, 2024
Nice, this has been released in |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |


Uh oh!
There was an error while loading.Please reload this page.
Summary
This PR will allow loading
jest.config.ctsfiles for ESM projects like proposed in PR#14064 and issue#13118Additionally, this PR will add fixtures and snapshots that should fix the tests.
Closes#14064
Test plan