var request = require('supertest'); describe("hoge",function(){ this.timeout(2000) var agent = request.agent("http://hogeapp.app/") it('send api', function (done) { agent .get('/debug') .set('Accept', 'application/json') .expect(function(res){ res.status.should.equal(404); }).end(function(err,res){ if(err){ throw err; } done(); }); }); })