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.
