Replying to @coderbyheart

I think this is typically done in the refactoring step of TDD but I've seen that
it helps to "sketch" the new business logic first using calls to helper
functions:

function addMemberToGroup(member, group) { if(!isMember(member, group)) {
addMember(member, group) } }

Tue, 19 Jul 2022 20:08:19 UTC3

1 reply

Replying to @coderbyheart

Once you have the structure of your implementation, you can implement isMember
and addMember.

This way you are not distracted by figuring out how to do it before having a
good understanding of what to do.