|<- [[Code coverage with Istanbul]]|[[Checking server responses with Cheerio]] ->| Tester les applications http comme les apps express. -> npmjs.com/package/supertest npm install supertest --save-dev // app-spec.js var request = require("supertest"); (...) it("Loads the home page", function(done) { request(app).get("/").expect(200).end(done); }); (...) it("GETS dictionary-api", function(done) { request(app).get("/dictionary-api").expect(200).end(done); }); it("POSTS dictionary-api", function(done) { request(app).post("/dictionary-api") .send({ "term":"Three", "defined":"Term three defined"}) .expect(200) .end(done); }); it("DELETES dictionary-api", function(done) { request(app).delete("/dictionary-api/One") .expect(200) .end(done); });