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

fix(jest-types): tighten Config types and set more defaults #9200

Merged
merged 2 commits into from Nov 19, 2019

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented Nov 17, 2019

Summary

#9197 showed me how wrong some of the types output by normalize is. While we have plans to overhaul it (and config in general), I've gone through now and ensured that the output from --show-config is actually valid GlobalConfig and ProjectConfig. I've also tightened some types which were unnecessarily wide (mostly both null and undefined, and some booleans that are always set)

Test plan

Green CI.

Not sure how to add an automated test. I think we should hold off for now, and add something together with the config rewrite. Probably runtypes, io-ts or something similar

@codecov-io
Copy link

Codecov Report

Merging #9200 into master will decrease coverage by 0.05%.
The diff coverage is 70.37%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9200      +/-   ##
==========================================
- Coverage   64.85%   64.79%   -0.06%     
==========================================
  Files         279      279              
  Lines       11744    11764      +20     
  Branches     2888     2897       +9     
==========================================
+ Hits         7616     7622       +6     
- Misses       3510     3514       +4     
- Partials      618      628      +10
Impacted Files Coverage Δ
packages/jest-config/src/Defaults.ts 100% <ø> (ø) ⬆️
packages/jest-runtime/src/index.ts 68.96% <ø> (-0.17%) ⬇️
packages/jest-haste-map/src/index.ts 81.26% <100%> (+0.05%) ⬆️
packages/jest-transform/src/ScriptTransformer.ts 69.33% <100%> (ø) ⬆️
packages/jest-config/src/normalize.ts 77.74% <66.66%> (-3.55%) ⬇️
packages/jest-reporters/src/coverage_reporter.ts 61.83% <75%> (+0.29%) ⬆️
packages/expect/src/utils.ts 96.2% <0%> (+1.26%) ⬆️

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 4643178...794f147. Read the comment docs.

@thymikee thymikee merged commit 8d3ddd5 into jestjs:master Nov 19, 2019
@SimenB SimenB deleted the lie-less-config branch November 19, 2019 09:43
ayush000 added a commit to ayush000/jest that referenced this pull request Nov 21, 2019
* master:
  chore: upgrade to fsevents 2 (jestjs#9215)
  docs: remove expect.assertions(1) in rejects example of Tutoria… (jestjs#9149)
  chore: bump to istanbul alphas (jestjs#9192)
  Fix typo in JestPlatform.md (jestjs#9212)
  jest-snapshot: Ignore indentation for most serialized objects (jestjs#9203)
  fix(jest-types): tighten Config types and set more defaults (jestjs#9200)
  jest-snapshot: Improve colors when snapshots are updatable (jestjs#9132)
  jest-snapshot: Omit irrelevant received properties when property matchers fail (jestjs#9198)
  chore: make changedFiles option optional in `shouldInstrument` (jestjs#9197)
  fix(pretty-format): correctly detect memo (jestjs#9196)
  chore: regenerate lockfiles in e2e tests (jestjs#9193)
  chore: bump handlebars
@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

4 participants