This is one of our missing areas of coverage: https://codecov.io/gh/shelljs/shelljs/src/a187bd1b36ce28a5af214607257506ee28e1beb6/src/ls.js#L80 This shouldn't be too tricky to test, but I'm not sure if extra precautions need to be taken for Windows.