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

convert all exports to ESM #7548

Merged
merged 2 commits into from
Dec 26, 2018
Merged

convert all exports to ESM #7548

merged 2 commits into from
Dec 26, 2018

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented Dec 25, 2018

Summary

Better tooling using the language for modules.

Not sure about the expect changes, thoughts?

Test plan

Green CI

@SimenB SimenB force-pushed the esm-export branch 3 times, most recently from e8ba1ba to 8221a20 Compare December 25, 2018 20:47
@codecov-io
Copy link

Codecov Report

Merging #7548 into master will decrease coverage by 0.07%.
The diff coverage is 59.09%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #7548      +/-   ##
=========================================
- Coverage   67.98%   67.9%   -0.08%     
=========================================
  Files         249     248       -1     
  Lines        9511    9478      -33     
  Branches        5       6       +1     
=========================================
- Hits         6466    6436      -30     
+ Misses       3043    3040       -3     
  Partials        2       2
Impacted Files Coverage Δ
packages/jest-util/src/createProcessObject.js 97.14% <ø> (-0.08%) ⬇️
packages/jest-environment-node/src/index.js 51.85% <ø> (-8.87%) ⬇️
...ages/jest-cli/src/reporters/get_snapshot_status.js 100% <ø> (ø) ⬆️
...ackages/jest-haste-map/src/lib/normalizePathSep.js 100% <ø> (ø) ⬆️
packages/jest-environment-jsdom/src/index.js 37.5% <ø> (-1.53%) ⬇️
packages/expect/src/jestMatchersObject.js 85.71% <ø> (ø) ⬆️
packages/jest-mock/src/index.js 85.49% <ø> (-0.05%) ⬇️
packages/jest-jasmine2/src/PCancelable.js 27.58% <ø> (-4.68%) ⬇️
packages/jest-config/src/getCacheDirectory.js 80% <ø> (-5.72%) ⬇️
packages/jest-phabricator/src/index.js 0% <ø> (ø) ⬆️
... and 32 more

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 511f5b2...ba200c6. Read the comment docs.

toMatchInlineSnapshot,
toMatchSnapshot,
toThrowErrorMatchingInlineSnapshot,
toThrowErrorMatchingSnapshot,
});
global.expect.extend = extend;
global.expect.assertions = assertions;
global.expect.hasAssertions = hasAssertions;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Aren't these methods already bound to expect? There's also expect.any, expect.anything, maybe it's better to import * as expect from 'expect';?

Copy link
Member Author

Choose a reason for hiding this comment

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

I changed this back to how it was.

Copy link
Collaborator

@thymikee thymikee left a comment

Choose a reason for hiding this comment

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

LGTM. Left one comment on importing expect in jest-circus, but I'm sure you've considered that already

@SimenB SimenB merged commit f13b97b into jestjs:master Dec 26, 2018
@SimenB SimenB deleted the esm-export branch December 26, 2018 11:32
@rubennorte rubennorte mentioned this pull request Jan 10, 2019
captain-yossarian pushed a commit to captain-yossarian/jest that referenced this pull request Jul 18, 2019
@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 12, 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.

4 participants