openems icon indicating copy to clipboard operation
openems copied to clipboard

fix: add type to test code

Open miettal opened this issue 1 year ago • 1 comments

$ npx tsc --strict
Found 3646 errors in 210 files.
↓
Found 1492 errors in 211 files.

miettal avatar Jul 05 '24 01:07 miettal

Codecov Report

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

Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #2702      +/-   ##
=============================================
+ Coverage      56.03%   56.04%   +0.02%     
- Complexity      8041     8044       +3     
=============================================
  Files           2059     2059              
  Lines          87513    87511       -2     
  Branches        6418     6420       +2     
=============================================
+ Hits           49032    49041       +9     
+ Misses         36797    36786      -11     
  Partials        1684     1684              

codecov[bot] avatar Jul 05 '24 01:07 codecov[bot]

rebased!

miettal avatar Aug 01 '24 01:08 miettal

If I run:

npm audit fix && npm install && node_modules/.bin/ng lint --fix; node_modules/.bin/tsc && node_modules/.bin/tsc-strict && node_modules/.bin/ng build -c "openems,openems-backend-prod,prod"

I get

src/app/shared/utils/array/array.utils.ts(17,21): error TS2345: Argument of type 'number | null | undefined' is not assignable to parameter of type 'number'.
src/app/shared/utils/array/array.utils.ts(31,21): error TS2345: Argument of type 'number | null | undefined' is not assignable to parameter of type 'number'.

sfeilmeier avatar Aug 01 '24 09:08 sfeilmeier

Sorry, I mis-rebased. now its ok.

findSmallestNumber and findBiggestNumber was refactord. https://github.com/OpenEMS/openems/pull/2702/commits/e228a2091656f8c642daca7d83a0038a0b6eb22a

miettal avatar Aug 01 '24 16:08 miettal