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

Fix path normalization in tests #77

Merged
merged 1 commit into from
May 12, 2018

Conversation

jakehamilton
Copy link
Contributor

Previously, running tests on a non-posix machine (eg. Windows) would
cause several to fail. The cause of the failure was file path comparison.
The expected values were written as posix style file paths (eg. a/b/c.txt)
while the actual values were returning windows style file paths (eg. a\b\c.txt).

The solution to this was to use node's built in path module to normalize
the paths for each system (https://nodejs.org/api/path.html#path_path_normalize_path).

closes #76

Previously, running tests on a non-posix machine (eg. Windows) would
cause several to fail. The cause of the failure was file path comparison.
The expected values were written as posix style file paths (eg. a/b/c.txt)
while the actual values were returning windows style file paths (eg. a\\b\\c.txt).

The solution to this was to use node's built in path module to normalize
the paths for each system (https://nodejs.org/api/path.html#path_path_normalize_path).
@codecov-io
Copy link

Codecov Report

Merging #77 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #77   +/-   ##
=======================================
  Coverage   86.06%   86.06%           
=======================================
  Files          80       80           
  Lines        1019     1019           
  Branches      154      154           
=======================================
  Hits          877      877           
  Misses        127      127           
  Partials       15       15

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 a99356f...64dbd18. Read the comment docs.

Copy link
Owner

@olistic olistic left a comment

Choose a reason for hiding this comment

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

Thanks for the patch, @jakehamilton!

@olistic olistic merged commit 91edb6a into olistic:master May 12, 2018
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.

🐛 File path tests are broken on Windows
3 participants