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

Document that / is used instead of path.sep and allow using path.sep #48

Open
mbargiel opened this issue Oct 18, 2018 · 0 comments
Open

Comments

@mbargiel
Copy link

The comment on

sep: '/' // Always use "/" path separators, so tests work consistently across platforms
claims that / is hard-coded to make tests portable. (In our case, this actually makes our tests less portable as we use path.join in our tests to get behavior closer to the OS we're running on.)

This choice should be documented (it was a surprise when it failed in Windows tests during CI).

Bonus points: making this overridable with a configuration option somewhere (e.g. usePathSep or something to that effect, whose default value would result in the current behavior) would ensure existing tests still work, but people writing code intended for multiple OSes can write tests more easily if they choose to use path.join in their test code.

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

No branches or pull requests

1 participant