ts-mockito icon indicating copy to clipboard operation
ts-mockito copied to clipboard

Included limitations

Open IgnorantSapient opened this issue 3 years ago • 6 comments

Spent 5 hours trying to mock standalone functions using ts.

IgnorantSapient avatar May 04 '21 15:05 IgnorantSapient

Codecov Report

Merging #211 (6f0a60b) into master (6637048) will increase coverage by 0.67%. The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #211      +/-   ##
==========================================
+ Coverage   93.55%   94.23%   +0.67%     
==========================================
  Files          34       34              
  Lines         652      659       +7     
  Branches       80       80              
==========================================
+ Hits          610      621      +11     
- Misses         30       33       +3     
+ Partials       12        5       -7     
Impacted Files Coverage Δ
src/utils/MockableFunctionsFinder.ts 91.66% <0.00%> (-8.34%) :arrow_down:
src/MethodStubSetter.ts 84.00% <0.00%> (ø)
src/MethodStubVerificator.ts 100.00% <0.00%> (ø)
src/utils/MethodCallToStringConverter.ts 100.00% <0.00%> (ø)
src/Mock.ts 95.77% <0.00%> (+1.40%) :arrow_up:
src/Spy.ts 86.11% <0.00%> (+5.55%) :arrow_up:
src/matcher/type/ObjectContainingMatcher.ts 100.00% <0.00%> (+10.00%) :arrow_up:

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 6637048...6f0a60b. Read the comment docs.

codecov-commenter avatar May 04 '21 15:05 codecov-commenter

typeof is a reserved word. Even if there is a way to name a function typeof (is there?) I would not use it as an example in documentation.

cspotcode avatar Jun 01 '21 13:06 cspotcode

@NagRock Its been more than a year since this small readme change was proposed, any reason as to why this shouldn't be merged? 🤔

IgnorantSapient avatar Jul 14 '22 22:07 IgnorantSapient

Looks like the review feedback from a year ago was only addressed 10 minutes ago.

Also might wanna take a look at #183

cspotcode avatar Jul 14 '22 22:07 cspotcode

@cspotcode this library has ~150,000 weekly downloads. Sad to see it not getting the attention it deserves. Maybe the @mockitoguy should adopt this.

IgnorantSapient avatar Jul 14 '22 22:07 IgnorantSapient

Check out relevant discussion in #183. Lots of community voices appeared to be opposed to realistic forms of adoption.

cspotcode avatar Jul 14 '22 22:07 cspotcode