January 2018
Beginner
658 pages
13h 10m
English
Now, let's create some describe blocks in the server.test file. We'll create a route describe block called Server. Then we'll create describe blocks for both the route URL and for /users. We'll have GET/. That will have the test case in there, some test case. Then alongside //, we'll have GET /users, and that will have its own test case, some test case as explained in the comments next:
const request = require('supertest');const expect = require('expect');var app = require('./server').app;// Server // GET / // some test case // GET / user // some test case
Now the test cases are obviously already defined. All we need to do is call describe three times to generate the previously explained ...
Read now
Unlock full access