Take It for a Drive
The tests are passing but we have not yet run the app as a server, though we did have to run the mongod database process, but only for the tests for the model. We’ll explore end-to-end testing, from the UI down to the database, later in the book. In the interim, having designed the server-side code, leaving it with the tests running is rather unsettling. We can’t celebrate the efforts until we see the fruits of the efforts run as a true Express app. We need one more thing before that can happen; let’s take care of that small bit.
We designed the db.js file, the model functions in model/task.js, and the routes in routes/tasks.js. The routes are all wired to a handful of path suffixes, but we need to assign a prefix to the ...
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.