Skip to content

Commit

Permalink
feature(view) : 클러스터 커밋 작성자 이름 중복 체크 테스트 작성(githru#723)
Browse files Browse the repository at this point in the history
  • Loading branch information
pithesun committed Sep 29, 2024
1 parent da96470 commit 4e85da4
Showing 1 changed file with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,21 @@ test("getClusterIds test", () => {
expect(result).toHaveLength(2);
});

test("getInitData test", () => {
describe("getInitData test", () => {
const result = getInitData(clusterNodeMockData);

expect(result).not.toBeUndefined();
expect(result[0].clusterId).toBe(0);
expect(result[0].summary.authorNames[0][0]).toBe("ytaek");
expect(result[0].summary.content.message).toBe("Initial commit");
test("getInitData test", () => {
expect(result).not.toBeUndefined();
expect(result[0].clusterId).toBe(0);
expect(result[0].summary.authorNames[0][0]).toBe("ytaek");
expect(result[0].summary.content.message).toBe("Initial commit");
});

test("클러스터의 커밋 작성자 이름이 중복되지 않는다.", () => {
const isUnique = result
.map((data) => data.summary.authorNames.length === new Set(data.summary.authorNames).size)
.every((value) => value === true);

expect(isUnique).toBe(true);
});
});

0 comments on commit 4e85da4

Please sign in to comment.