react-native-google-mobile-ads icon indicating copy to clipboard operation
react-native-google-mobile-ads copied to clipboard

test: fix outdated and unused type tests

Open DoctorJohn opened this issue 1 year ago • 2 comments

Description

This PR fixes that our compile time type tests were never evaluated. Furthermore, it also updates the tests to include all types that have been added since their last update.

Related issues

  • Fixes #615

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
    • [x] Yes
  • My change supports the following platforms;
    • [ ] Android
    • [ ] iOS
  • My change includes tests;
    • [ ] e2e tests added or updated in __tests__e2e__
    • [ ] jest tests added or updated in __tests__
  • [ ] I have updated TypeScript types that are affected by my change.
  • This is a breaking change;
    • [ ] Yes
    • [x] No

Test Plan

  • Made sure yarn tsc:compile now passes
  • Checked that all types exported from src/index.ts are covered

DoctorJohn avatar Jul 27 '24 22:07 DoctorJohn

Looks like CI is doing its job now, that's good! But I need to take a look why the module declaration file cannot be found.

DoctorJohn avatar Jul 27 '24 22:07 DoctorJohn

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 43.11%. Comparing base (a34c7ba) to head (fb4fda5). Report is 61 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #619      +/-   ##
==========================================
- Coverage   43.72%   43.11%   -0.60%     
==========================================
  Files          30       31       +1     
  Lines         549      573      +24     
  Branches      151      154       +3     
==========================================
+ Hits          240      247       +7     
- Misses        309      326      +17     

codecov[bot] avatar Aug 19 '24 01:08 codecov[bot]

Forget to mention that I made this work by adjusting the import to point to the uncompiled source. Before, ts had trouble finding the type declarations. As far as I can tell, the updated type tests pass as expected now both in CI and via yarn tsc:compile. @dylancom

DoctorJohn avatar Sep 06 '24 17:09 DoctorJohn

Hi @mikehardy, could you give this PR a quick look? Thanks~

DoctorJohn avatar Oct 07 '24 14:10 DoctorJohn

"just in case" was important, caught some latent issue from #622 - investigating

mikehardy avatar Oct 07 '24 18:10 mikehardy

will rebase this and push to re-run CI with the result of #642 once that is in

mikehardy avatar Oct 07 '24 19:10 mikehardy

:tada: This PR is included in version 14.2.4 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

mikehardy avatar Oct 07 '24 20:10 mikehardy