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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
common.fileExists()
doesn't throw, soassert.doesNotThrow()
is redundant. Either leave as is, or assert on the return value fromcommon.fileExists()
.Side note:
common.fileExists()
isn't necessary anymore. It was added whenfs.exists()
was scheduled for deprecation and removal.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should is maybe be replaced with fs.exists?
Do you think this PR should be closed? If so should we maybe have @df1 remove some instances of common.fileExists?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MylesBorins do you mean
fs.stat()
orfs.access()
?Since
fs.exists()
is deprecated.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for saying
fs.exists()
, when I meantfs.existsSync()
. I'd be +1 to removingcommon.fileExists()
and replacing it withfs.existsSync()
.This particular change should either be backed out, or updated to use
existsSync()
withoutassert.doesNotThrow()
.