2016-03-23 9 views

答えて

0

を知っているので、私はできる結果を表示したい

var CONFIG = require('./config'); 
var chai = require('chai'); 
var chaiHttp = require('chai-http'); 
var should = chai.should(); 
var server = CONFIG.apiPath; 

chai.use(chaiHttp); 


describe('TEST', function() { 
    it('getAllLandingPage completed',function(){ 
    chai.request(server) 
     .get('getAllLandingPage') 
     .end(function(err, res){ 
     res.should.have.status(200); 
     console.log('res: ', res) // not show 
     done(); 
     }); 
    }); 
}); 

あなたがitのコールバック関数でdoneを逃すようで、

以下のようにそれを試してみてください
it('getAllLandingPage completed',function(done){ 
    chai.request(server) 
     .get('getAllLandingPage') 
     .end(function(err, res){ 
     if (err) 
      done(err); 
     else { 
      res.should.have.status(200); 
      console.log(res) 
      done(); 
     } 
     }); 
    }); 
+0

ああ。ありがとうございました。それを私が直した。 –

関連する問題