mirror of
https://github.com/kiegroup/git-backporting.git
synced 2025-06-27 21:23:48 +00:00
refactor: changed method name and removed useless data
This commit is contained in:
parent
99fbcc39cc
commit
a30b6d6290
8 changed files with 19 additions and 34 deletions
|
@ -15,7 +15,7 @@ describe("pull request config parser", () => {
|
|||
let parser: PullRequestConfigsParser;
|
||||
|
||||
beforeAll(() => {
|
||||
GitServiceFactory.init(GitServiceType.GITHUB, "whatever");
|
||||
GitServiceFactory.getOrCreate(GitServiceType.GITHUB, "whatever");
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -95,8 +95,6 @@ describe("pull request config parser", () => {
|
|||
cloneUrl: "https://github.com/owner/reponame.git"
|
||||
},
|
||||
bpBranchName: undefined,
|
||||
nCommits: 0,
|
||||
commits: []
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -289,8 +287,6 @@ describe("pull request config parser", () => {
|
|||
cloneUrl: "https://github.com/owner/reponame.git"
|
||||
},
|
||||
bpBranchName: undefined,
|
||||
nCommits: 0,
|
||||
commits: []
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -365,8 +361,6 @@ describe("pull request config parser", () => {
|
|||
cloneUrl: "https://github.com/owner/reponame.git"
|
||||
},
|
||||
bpBranchName: undefined,
|
||||
nCommits: 0,
|
||||
commits: []
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -441,8 +435,6 @@ describe("pull request config parser", () => {
|
|||
cloneUrl: "https://github.com/owner/reponame.git"
|
||||
},
|
||||
bpBranchName: undefined,
|
||||
nCommits: 0,
|
||||
commits: []
|
||||
});
|
||||
});
|
||||
});
|
|
@ -10,7 +10,7 @@ describe("github service", () => {
|
|||
|
||||
beforeAll(() => {
|
||||
// init git service
|
||||
GitServiceFactory.init(GitServiceType.GITHUB, "whatever");
|
||||
GitServiceFactory.getOrCreate(GitServiceType.GITHUB, "whatever");
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -33,7 +33,7 @@ describe("github service", () => {
|
|||
cloneUrl: "https://github.com/owner/reponame.git"
|
||||
});
|
||||
expect(res.title).toBe("PR Title");
|
||||
expect(res.commits.length).toBe(1);
|
||||
expect(res.commits!.length).toBe(1);
|
||||
expect(res.commits).toEqual(["28f63db774185f4ec4b57cd9aaeb12dbfb4c9ecc"]);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue