Complete the Design
We completed about a dozen tests and all the efforts so far have gone toward fetching a list of tasks from the server and displaying them in the view. We still have two major features on our hands: to add a task and to delete a task. Both of these features need to communicate with the server. However, unlike getTasks these will have to send some data to the server in addition to getting a response. Let’s work on adding a task first and then look at the delete operation after that.
Design addTask
Let’s start by looking at the current test list:
- …
- ✓ register onready handler with document
- ✓ initpage calls getTasks
- addTask updates message
- addTask calls getTasks
- register add task click event on window load
We can expect the tests for ...
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.