Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently tests are producing several failures on windows systems. This is happening because of two issues where cli test conditions do not match the functionality in the cli code being tested. This patch resolves the following issues:
process.env.HOMEPATH
fallback for .jshintrc filesThe
testHomeRcFile
andtestTargetRelativeRcLookup
tests were only usingprocess.env.HOME
, which returnsundefined
on windows systems. It also does not match the functionality offindConfig()
which coalesces theHOME
andHOMEPATH
environmental variables to support both *nix and windows.The
testHomeRcFile
andtestTargetRelativeRcLookup
tests were stubbing the .jshintrc files with hard coded forward slashes for path separators, which does not match the paths that thefindConfig()
will try to open. ThefindConfig()
function runs the file paths through thepath.resolve()
method which returns a normalized path string. So the stubbed file commands were never actually being executed on windows systems.Please note that I only fixed the failing tests in this patch. It might be a good idea to go through all of the tests at some point and make sure that paths are normalized across the board.