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

Update docs section about typescript setup #283

Merged
merged 3 commits into from Oct 11, 2021

Conversation

matthias-pichler-warrify
Copy link
Contributor

What

Updated the docs section to include the setup for ts-jest >= 25.5.0

Why

ts-jest >= 25.5.0 introduces breaking changes that require additional configuration.

Notes

Closes #282

Housekeeping

  • Unit tests
  • Documentation is up to date
  • No additional lint warnings
  • Typescript definitions are added/updated where relevant

README.md Outdated Show resolved Hide resolved
@villasv
Copy link

villasv commented Sep 10, 2020

I also think it would be nice to warn users about declaration merging not working if you manually import the jest module as the jest docs comment: import { expect } from '@jest/globals.

It fails because jest-extended will merge its type declarations into the types provided by @types/jest. So if you use expect from @jest/globals, the added matchers won't be there.

@codecov
Copy link

codecov bot commented Nov 2, 2020

Codecov Report

Merging #283 (a66120c) into main (437d55a) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##              main      #283    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files          109       117     +8     
  Lines          554       738   +184     
  Branches        97       108    +11     
==========================================
+ Hits           554       738   +184     
Impacted Files Coverage Δ
src/matchers/index.js 100.00% <0.00%> (ø)
src/matchers/toBeNaN/index.js 100.00% <0.00%> (ø)
src/matchers/toBeNil/index.js 100.00% <0.00%> (ø)
src/matchers/toBeOdd/index.js 100.00% <0.00%> (ø)
src/matchers/toBeDate/index.js 100.00% <0.00%> (ø)
src/matchers/toBeEven/index.js 100.00% <0.00%> (ø)
src/matchers/toBeTrue/index.js 100.00% <0.00%> (ø)
src/matchers/toReject/index.js 100.00% <0.00%> (ø)
src/matchers/toBeAfter/index.js 100.00% <0.00%> (ø)
src/matchers/toBeArray/index.js 100.00% <0.00%> (ø)
... and 78 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 437d55a...a66120c. Read the comment docs.

Co-authored-by: Liwen Guo <lg@livven.me>
README.md Outdated Show resolved Hide resolved
@SimenB
Copy link
Member

SimenB commented Oct 11, 2021

I also think it would be nice to warn users about declaration merging not working if you manually import the jest module as the jest docs comment: import { expect } from '@jest/globals.

It fails because jest-extended will merge its type declarations into the types provided by @types/jest. So if you use expect from @jest/globals, the added matchers won't be there.

Agreed, wanna open up a PR @villasv? 🙂

@SimenB SimenB merged commit a40d1ea into jest-community:main Oct 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update typescript setup docs after breaking change in ts-jest 25.5.0
5 participants