You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
The comment on
chai-fs/lib/assertions/directory_content.js
Line 74 in e59d552
/
is hard-coded to make tests portable. (In our case, this actually makes our tests less portable as we usepath.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 usepath.join
in their test code.The text was updated successfully, but these errors were encountered: