Feature: Get a project
As a vision user I want to get a project So that I can monitor the activity of selected repositories
Let's add a test to the existing set of tests ./test/project.js
for our feature Get a project
. This resource will GET a project from route /project/:id
, and return a 200 OK
status.
Let's install underscore.js
; a utility-belt library that provides functional programming support:
npm install underscore --save
describe('when requesting an available resource /project/:id', function(){ it('should respond with 200', function(done){ request(app) .get('/project/' + id) .expect('Content-Type', /json/) .expect(200) .end(function (err, res) { var proj = JSON.parse(res.text); assert.equal(proj._id, id); assert(_.has(proj, '_id')); assert(_.has(proj, ...
Get Advanced Express Web Application Development 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.