If you defined your routes in a way where you pass app
to a function then you could use supertest to test a route.
Test
var app = require('./real-or-fixture-app'); //depends on your setup
require('routeToTest')(app);
var request = require("supertest");
describe("Test", function(){
it("should test a route", function(done){
request(app)
.post("/route")
.send({data:1})
.expect(200, done);
});
});
Route definition
module.exports = function(app){
app.get("/route", ....
};
I am not quite sure that this is really what you are looking for, but it is a way to test your routes separately.