-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add regression test for .git
file watcher
#3259
Conversation
@@ -74,7 +79,7 @@ export class ExperimentsData extends BaseData<ExperimentsOutput> { | |||
this.dvcRoot | |||
) | |||
|
|||
const dotGitPath = getGitPath(gitRoot, gitPath.DOT_GIT) | |||
const dotGitPath = this.dotGitPath || getGitPath(gitRoot, gitPath.DOT_GIT) |
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.
[Q] Are you sure you need this when AvailableCommands.GIT_GET_REPOSITORY_ROOT
is already returning the mockRoot? Could you stub getGitPath
instead of adding code just for testing purposes?
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.
Good idea!
|
||
const data = disposable.track( | ||
new ExperimentsData( | ||
dvcDemoPath, | ||
{ | ||
dispose: stub(), | ||
executeCommand: mockExecuteCommand | ||
executeCommand: (command: CommandId) => { |
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.
Ended up moving the executeCommand
to be inline to avoid the no-identical-function
eslint rule. I could be wrong, but when I tried to create a single function for the two to share it looked like I was overcomplicating things 🤔
Code Climate has analyzed commit ad931a1 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (85% is the threshold). This pull request will bring the total coverage in the repository to 95.9% (0.0% change). View more on Code Climate. |
Followup to #3191