-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Reduce code smells * Another one
- Loading branch information
Showing
1 changed file
with
9 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,39 @@ | ||
export class WhenStatics { | ||
|
||
public static mockGitConfigEmail = { | ||
public static readonly mockGitConfigEmail = { | ||
cmdArgs: ["git", "config", "user.email"], | ||
returnValue: {stdout: "[email protected]\n"}, | ||
}; | ||
public static mockGitConfigName = { | ||
public static readonly mockGitConfigName = { | ||
cmdArgs: ["git", "config", "user.name"], | ||
returnValue: {stdout: "Testersen\n"}, | ||
}; | ||
public static mockUID = { | ||
public static readonly mockUID = { | ||
cmdArgs: ["id", "-u"], | ||
returnValue: {stdout: "990\n"}, | ||
}; | ||
public static mockGitRemote = { | ||
public static readonly mockGitRemote = { | ||
cmdArgs: ["git", "remote", "-v"], | ||
returnValue: {stdout: "origin\[email protected]:gcl/test-project.git (fetch)\norigin\[email protected]:gcl/test-project.git (push)\n"}, | ||
}; | ||
public static mockGitDefaultBranch = { | ||
public static readonly mockGitDefaultBranch = { | ||
cmdArgs: ["git", "symbolic-ref", "--short", "refs/remotes/origin/HEAD"], | ||
returnValue: {stdout: "origin/main"}, | ||
}; | ||
public static mockGitBranchName = { | ||
public static readonly mockGitBranchName = { | ||
cmdArgs: ["git", "rev-parse", "--abbrev-ref", "HEAD"], | ||
returnValue: {stdout: "master"}, | ||
}; | ||
public static mockGitCommitSha = { | ||
public static readonly mockGitCommitSha = { | ||
cmdArgs: ["git", "rev-parse", "HEAD"], | ||
returnValue: {stdout: "02618988a1864b3d06cfee3bd79f8baa2dd21407"}, | ||
}; | ||
public static mockGitCommitShaShort = { | ||
public static readonly mockGitCommitShaShort = { | ||
cmdArgs: ["git", "rev-parse", "--short", "HEAD"], | ||
returnValue: {stdout: "0261898"}, | ||
}; | ||
|
||
public static all = [ | ||
public static readonly all = [ | ||
WhenStatics.mockGitConfigEmail, | ||
WhenStatics.mockGitConfigName, | ||
WhenStatics.mockUID, | ||
|