Adnan Rahić
Aug 23, 2017 · 1 min read

Hi Michael,

I’m glad you liked the article. You are right about removing logic from tests. The best case scenario would be to only have sum1 in your arrange step.

// 1. ARRANGE 
var sum1 = 6;
// 2. ACT
var sum2 = addTwoNumbers(5, 1);

I’d write it like this.

However, the reason I kept the logic was to show beginners that the behavior is exactly the same! What’s important to take away from the article is that tests exist to simulate the way we expect a piece of code to behave.

)

    Adnan Rahić

    Written by

    Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
    Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
    Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade