Skip to content

path: remove dead code in favor of unit tests

Rodrigo Muino Tomonari requested to merge github/fork/nwoltman/path-cleanup into master

This PR removes dead code paths that are created by assertions that will never trigger. They may only trigger if either the splitDeviceRe or splitPathRe regular expressions or the [win32|posix]SplitPath functions are modified. If at some point they are modified (and for some reason the author doesn't update the code that uses those regexes/functions), current unit tests will catch most of the resulting errors and this PR adds extra tests to catch the remaining errors.

Originally opened as joyent/node#25334.

Merge request reports

Loading