AmadeusITGroup / kassette

kassette is a development server, used mainly for testing, which proxies requests and is able to easily manage local mocks.
MIT License
9 stars 15 forks source link

fix(test): e2e code coverage on windows #451

Closed divdavem closed 2 years ago

divdavem commented 2 years ago

On Windows, it looks like readFileSync is called with a path containing forward slashes (instead of the usual backward slashes), and shouldInstrument checks that the file path starts with the correct folder (with backward slashes), so no file was instrumented. Calling normalize replaces forward slashes with backward slashes and fixes the issue.

codecov[bot] commented 2 years ago

Codecov Report

Merging #451 (9f92810) into master (c04c077) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #451   +/-   ##
=======================================
  Coverage   89.54%   89.54%           
=======================================
  Files          32       32           
  Lines         784      784           
  Branches      159      159           
=======================================
  Hits          702      702           
  Misses         47       47           
  Partials       35       35           
Flag Coverage Δ
e2e 74.61% <ø> (ø)
ut 59.56% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out 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 c04c077...9f92810. Read the comment docs.