You're doing JavaScript testing wrong
SMRTR summary
Focus on external behaviors instead of implementation details when testing. Write empty tests with behavior comments first, then code the tests, and finally implement the actual code for better maintainability.
SMRTR provides this summary for quick context. The original article belongs to Go Make Things.
Read the original article