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

Cleanup displayName type #10049

Merged
merged 1 commit into from
May 19, 2020

Conversation

kenrick95
Copy link
Contributor

@kenrick95 kenrick95 commented May 15, 2020

Summary

Fixes #10010

If I understand correctly, the type of displayName in ProjectConfig type cannot be a string because it has been normalized, therefore I remove the string type in the DisplayName type. Since InitialOptions can still take in string I add it back there.

The rest is to change the places where displayName is treated as string (i.e. remove such codes because it will never happen)

TODOs:

  • Update CHANGELOG.md
  • Is there any more place that I should change?

Test plan

Check CI results 😅

@kenrick95 kenrick95 force-pushed the kenrick/refine-type-display-name branch 2 times, most recently from ce98b74 to a51abe3 Compare May 16, 2020 01:46
@codecov-io
Copy link

Codecov Report

Merging #10049 into master will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10049      +/-   ##
==========================================
+ Coverage   64.00%   64.01%   +0.01%     
==========================================
  Files         297      297              
  Lines       12528    12524       -4     
  Branches     3093     3088       -5     
==========================================
- Hits         8018     8017       -1     
+ Misses       3860     3858       -2     
+ Partials      650      649       -1     
Impacted Files Coverage Δ
packages/jest-core/src/getProjectDisplayName.ts 0.00% <ø> (ø)
packages/jest-reporters/src/utils.ts 81.14% <ø> (+0.50%) ⬆️
packages/jest-test-result/src/helpers.ts 0.00% <ø> (ø)

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 56079a5...a51abe3. Read the comment docs.

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

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

I think this covers it, thanks! Just a changelog entry and we can merge 🙂

packages/jest-core/src/getProjectDisplayName.ts Outdated Show resolved Hide resolved
@kenrick95 kenrick95 force-pushed the kenrick/refine-type-display-name branch from a51abe3 to 6d1b685 Compare May 16, 2020 08:14
@kenrick95 kenrick95 requested a review from SimenB May 18, 2020 11:44
@SimenB SimenB merged commit 2460c05 into jestjs:master May 19, 2020
@SimenB
Copy link
Member

SimenB commented May 19, 2020

Thanks!

@kenrick95 kenrick95 deleted the kenrick/refine-type-display-name branch May 20, 2020 01:54
jeysal added a commit to jeysal/jest that referenced this pull request May 25, 2020
…esolve-outside

* upstream/master: (106 commits)
  docs: fix jest-diff example (jestjs#10067)
  Cleanup `displayName` type (jestjs#10049)
  docs: correct confusing filename in `enableAutomock` example (jestjs#10055)
  chore: minor optimize getTransformer (jestjs#10050)
  chore: fix TestUtils.ts to match the types (jestjs#10034)
  Minor test name typo fix (jestjs#10033)
  chore: upgrade to typescript 3.9 (jestjs#10031)
  feat: CLI argument to filter tests by projects (jestjs#8612)
  chore: bump `istanbul-lib-instrument` (jestjs#10009)
  feat: support config files exporting (`async`) `function`s (jestjs#10001)
  fix: add missing haste-map dep to jest-snapshot (jestjs#10008)
  🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉 (jestjs#10000)
  Fix typo in dependency warning (jestjs#10006)
  chore: add missing comma (jestjs#9999)
  fix: Control no diff message color with diff options (jestjs#9997)
  fix(jest-jasmine2): fix Error message (jestjs#9990)
  docs: fix jest-object ids for docusaurs (jestjs#9994)
  docs: fix Configuration, JestPlatform and JestObjectAPI docs for 26 (jestjs#9985)
  Add migration notes for breaking changes (jestjs#9978)
  chore: fix date and heading in blog post (jestjs#9977)
  ...
@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.

Cleanup displayName type
4 participants