tape-testing / tape

tap-producing test harness for node and browsers
MIT License
5.77k stars 307 forks source link

Fix path parsing and tests on windows #602

Closed Joris-van-der-Wel closed 7 months ago

Joris-van-der-Wel commented 7 months ago

This is a follow up of #183 which involved a similar fix for a much older version (9 years ago) of this library. I noted 4 years ago that the stack trace parsing on windows had already been fixed by someone else.

However I just discovered that the issue has cropped up again, which this PR attempts to fix. Luckily this time the existing tests already check for this issue, however the tests must be ran on windows. This uncovered more issues because a lot of tests were broken on windows.

Some tests were attempting to spawn bin/tape, instead of node bin/tape. This does not work on my windows machine.

The failing tests uncovered that the --ignore and --ignore-pattern options do not work properly on windows. This was because the old version of glob uses forward slashes on windows, while dotignore expects backslashes.

It was not possible to run the tests using npm test. This was because of a bug in the old versions of nyc, and also because single quotes were used in the run script.

Before:

  303 passing (14s)
  8 pending
  64 failing

After:

  374 passing (31s)
  5 pending

The individual commits in this PR contain more details.

socket-security[bot] commented 7 months ago

New dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
nyc 10.3.2 eval, environment +1 23.6 MB bcoe
Joris-van-der-Wel commented 7 months ago

I have a new version of these commits without any dependency update. They are on a different branch.

How would you prefer to receive these new changes? Force push? New PR? Extra commit?

ljharb commented 7 months ago

Force push to this branch would be great :-) thanks!

codecov[bot] commented 7 months ago

Codecov Report

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

Comparison is base (4640a91) 96.76% compared to head (fc33439) 96.76%.

:exclamation: Current head fc33439 differs from pull request most recent head bcf6ce7. Consider uploading reports for the commit bcf6ce7 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #602 +/- ## ======================================= Coverage 96.76% 96.76% ======================================= Files 4 4 Lines 742 742 Branches 182 182 ======================================= Hits 718 718 Misses 24 24 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.