A Different Unit Test Pattern
For this specific set of code, the original code could be tested by simply moving the code above into the test. But here, the point is that the pattern should never have been used.
Tags: testing, javascript, webdev, patterns