I am learning Node.js and Express framework. I am a big fan of jasmine. So I want to use jasmine whenever I can, however, I can\'t find a good way testing Express with jasmine.
Maybe you could try supertest with mocha.
Here's a simple example :
var request = require('supertest')
, express = require('express');
var app = express();
app.get('/user', function(req, res){
res.send(200, { name: 'toto' });
});
describe('GET /user', function(){
it('should respond with json', function(done){
request(app)
.get('/user')
.set('Accept', 'application/json')
.expect('Content-Type', 'json')
.expect(200, done);
})
})