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

feat: pass ESM options to Babel #9766

Merged
merged 7 commits into from Apr 5, 2020

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented Apr 4, 2020

Summary

Extracted from #9597. I don't like the changes to ScriptTransformer in that PR, but I think the changes to babel-jest makes sense.

Test plan

Unit tests added. As with #9597, there's no real way of triggering this behavior with real code so not thoroughly tested

@@ -17,6 +17,7 @@
{"path": "../jest-snapshot"},
{"path": "../jest-source-map"},
{"path": "../jest-test-result"},
{"path": "../jest-transform"},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was missing, sometimes leading to weird type errors

@codecov-io
Copy link

Codecov Report

Merging #9766 into master will increase coverage by 0.00%.
The diff coverage is 72.72%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #9766   +/-   ##
=======================================
  Coverage   64.88%   64.88%           
=======================================
  Files         288      288           
  Lines       12190    12193    +3     
  Branches     3020     3024    +4     
=======================================
+ Hits         7910     7912    +2     
- Misses       3639     3640    +1     
  Partials      641      641           
Impacted Files Coverage Δ
packages/jest-runtime/src/index.ts 65.28% <ø> (ø)
packages/jest-transform/src/ScriptTransformer.ts 68.63% <ø> (ø)
packages/babel-jest/src/index.ts 51.42% <72.72%> (+1.42%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7e5e422...e520270. Read the comment docs.

@SimenB SimenB merged commit bb720d2 into jestjs:master Apr 5, 2020
@SimenB SimenB deleted the support-esm-options-babel-jest branch April 5, 2020 08:52
jeysal added a commit to mmkal/jest that referenced this pull request Apr 10, 2020
…pshots

* upstream/master: (225 commits)
  docs: add CLA link to contributing docs (jestjs#9789)
  chore: roll new version of docs
  v25.3.0
  chore: update changelog for release
  chore(jest-types): correct type testRegex for ProjectConfig (jestjs#9780)
  feat(circus): enable writing async test event handlers (jestjs#9397)
  feat: enable all babel syntax plugins (jestjs#9774)
  chore: add helper for getting Jest's config in e2e tests (jestjs#9770)
  feat: pass ESM options to transformers (jestjs#9597)
  chore: replace `any`s with `unknown`s (jestjs#9626)
  feat: pass ESM options to Babel (jestjs#9766)
  chore(website): add copy button the code blocks (jestjs#9750)
  chore: bump istanbul-reports for new uncovered lines design (jestjs#9758)
  chore: correct CHANGELOG.md (jestjs#9763)
  chore(jest-types): expose type `CacheKeyOptions` for `getCacheK… (jestjs#9762)
  docs: Fix simple typo, seperated -> separated (jestjs#9760)
  v25.2.7
  chore: update changelog for release
  fix: drop getters and setters when diffing objects for error (jestjs#9757)
  chore(jest-types): correct return type of shouldRunTestSuite fo… (jestjs#9753)
  ...
@github-actions
Copy link

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.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants