Milestone 1 – A First Passing Test Against the Server

We will approach the requirements through a set of milestones. The first milestone we will try to reach is a very first passing end-to-end Jasmine test case against our web service API.

Let's see what we need to reach that milestone:

  • We need to be able to execute Jasmine test cases
  • We need a Jasmine spec that requests our HTTP backend
  • We need an HTTP backend that responds to the request

In order to verify that we are good to go in regards to executing Jasmine test cases, let's create a subfolder spec/e2e in our project directory:

mkdir -p spec/e2e

Next, we create the file that will hold the end-to-end tests for our yet-to-be-written API server. We name it apiSpec.js and store it ...

Get The Node Craftsman Book 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.