Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes tests comparing paths to be cross platform Closes #1076 #1085

Merged
merged 1 commit into from
Aug 28, 2021

Conversation

JasirZaeem
Copy link
Member

@JasirZaeem JasirZaeem commented Aug 27, 2021

Closes #1076

As described in 1076, tests comparing file paths using simple string equality/matching don't work across platforms as different platforms can use different characters as file separators. Some of these tests were fixed in #1078

#1078 (comment) these two checks are fixed in this PR.

Instead of comparing with filePath, path.join(process.cwd(), filePath) is used to evaluate the correct path for the platform and then compared.

@vercel
Copy link

vercel bot commented Aug 27, 2021

@JasirZaeem is attempting to deploy a commit to a Personal Account owned by @garageScript on Vercel.

@garageScript first needs to authorize it.

@codecov
Copy link

codecov bot commented Aug 27, 2021

Codecov Report

Merging #1085 (80cdd70) into master (b1a6736) will not change coverage.
The diff coverage is n/a.

❗ Current head 80cdd70 differs from pull request most recent head a226c8e. Consider uploading reports for the commit a226c8e to get more accurate results
Impacted file tree graph

@@            Coverage Diff            @@
##            master     #1085   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          137       137           
  Lines         2168      2168           
  Branches       506       506           
=========================================
  Hits          2168      2168           

Copy link
Contributor

@tomrule007 tomrule007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice update to the tests, keeping them useful and corect.

@JasirZaeem JasirZaeem merged commit 54462d4 into garageScript:master Aug 28, 2021
@JasirZaeem JasirZaeem deleted the fix-fs-tests branch July 10, 2022 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests comparing paths failing on windows
2 participants