Leap Into Tactical—Test First—Design

From the initial design we’ll move on to the tactical design, the act of making fine-grained design decisions and implementing code. We’ll use the strategic design as a starting point and pick a few functions to begin the design with tests. We’ll write positive, negative, and exception tests and along the way make detailed design decisions. As we transition from one function to the next, you will see the design and the code for the program take shape, one piece at a time.

Let’s start by jotting down a series of tests.

Create an Initial Test List

Jot down the tests that come to mind, on a piece of paper—don’t worry about right or wrong at this time:

  • read invokes processTickers if the file is valid
  • read invokes ...

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.