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

Replace usage of find & findIndex with other methods to support IE & PhantomJS

Open MasterCassim opened this issue 7 years ago • 4 comments

After debugging quite a while I have noticed that the mocking does not work with IE & PhantomJS unless there is a polyfill for find and findIndex. I have replaced the occurrences with other methods supported in all browsers.

MasterCassim avatar Feb 28 '18 13:02 MasterCassim

Hi @MasterCassim, why have you reverted changes in Mock.ts? We need to discuss that with @NagRock, I think a nicer solution would be to introduce required polyfills.

bendykowski avatar Feb 28 '18 13:02 bendykowski

I reverted these changes because they were on classes which support the find; I have incorrectly modified the calls.

MasterCassim avatar Feb 28 '18 13:02 MasterCassim

Codecov Report

Merging #88 into master will decrease coverage by 0.12%. The diff coverage is 85.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #88      +/-   ##
==========================================
- Coverage   94.58%   94.45%   -0.13%     
==========================================
  Files          35       35              
  Lines         609      613       +4     
  Branches       69       70       +1     
==========================================
+ Hits          576      579       +3     
- Misses         24       25       +1     
  Partials        9        9
Impacted Files Coverage Δ
src/MethodStubCollection.ts 96.55% <85.71%> (-3.45%) :arrow_down:

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 ba5997f...f21c114. Read the comment docs.

codecov-io avatar Feb 28 '18 14:02 codecov-io

Any progress?

MasterCassim avatar Mar 22 '18 08:03 MasterCassim