ts-jest icon indicating copy to clipboard operation
ts-jest copied to clipboard

fix(transformer): allow transforming of .cts/.mts extensions. (#3996)

Open smack0007 opened this issue 2 years ago • 1 comments

Summary

This is a pull request to implement the feature request: Support loading of ".cjs" and ".cts" files. #3996

Test plan

I added 2 test cases to src/legacy/ts-jest-transformer.spec.ts to test loading of '.cts' and '.cjs' files.

npm run test reports:

Test Suites: 35 passed, 35 total
Tests:       329 passed, 329 total
Snapshots:   135 passed, 135 total

npm run test-examples also exited successfully.

Does this PR introduce a breaking change?

  • [ ] Yes
  • [ X] No

Other information

This fix will allow us to remove our hack we've been using in order to transform .cts files and load .cjs files.

smack0007 avatar Jan 26 '23 13:01 smack0007

Hey, thanks for the work! I do get these errors as well now in Angular. Can you have a look at failing tests and update your branch to latest?

Is there anything else needed for this PR to get merged?

muuvmuuv avatar Jun 23 '23 07:06 muuvmuuv