Skip to content

Commit

Permalink
BC-8063 - Remove excess Method from BoardNode (#5232)
Browse files Browse the repository at this point in the history
  • Loading branch information
uidp authored Sep 10, 2024
1 parent c7708ca commit 2490c16
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
7 changes: 0 additions & 7 deletions apps/server/src/modules/board/domain/board-node.do.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,10 @@ export abstract class BoardNode<T extends BoardNodeProps> extends DomainObject<T
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
copyProps.domainObject = undefined;
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
copyProps.children = [];

return copyProps;
}

public getTrueProps(): T {
return this.props;
}

get level(): number {
return this.ancestorIds.length;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ describe(BoardNodeService.name, () => {
const parentNode = cardFactory.build();
parentNode.addChild(oldNode);

boardNodeRepo.findById.mockResolvedValueOnce(new Card({ ...parentNode.getTrueProps() }));
boardNodeRepo.findById.mockResolvedValueOnce(new Card({ ...parentNode.getProps() }));

return {
parentNode,
Expand All @@ -179,7 +179,7 @@ describe(BoardNodeService.name, () => {
await service.replace(oldNode, newNode);

expect(boardNodeRepo.save).toHaveBeenCalledWith(
new Card({ ...parentNode.getTrueProps(), children: [oldNode, newNode] })
new Card({ ...parentNode.getProps(), children: [oldNode, newNode] })
);
});

Expand Down

0 comments on commit 2490c16

Please sign in to comment.