Separate Dependencies Where Possible

Dependencies play a major part in the overall problem at hand. Looking at the spike, automated testing efforts may appear bleak. But the modular design we visualized is encouraging. The first step toward writing automated tests should be to identify one or more functions with no intrinsic dependencies. Those functions should be the starting point of automated tests.

Looking at the spike, the URL is created right in the middle, after extracting the latitude and longitude from position and before setting the URL into the location. From the testing point of view, in addition to verifying that the URL is created correctly, we must also check that any errors are handled appropriately. But such testing is very ...

Get Test-Driving JavaScript Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.