Skip to content

Commit

Permalink
完善测试用例;
Browse files Browse the repository at this point in the history
  • Loading branch information
am committed Nov 30, 2017
1 parent 6485e69 commit ca68009
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/api.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
/**
* Created by obzerg on 16/1/5.
*/
var http = require('http');
var bluebird = require('bluebird');
var should = require('should');
var Yhsd = require('../index');

Expand Down Expand Up @@ -109,7 +107,7 @@ describe('test/api.test.js', function () {
})
});

it('api should be return connect ETIMEDOUT error', function (done) {
it('api should be throw ENOTFOUND error', function (done) {
Yhsd.config.apiHost = 'localhost:32876';
Yhsd.config.appHost = 'localhost:32876';
Yhsd.config.httpProtocol = 'http';
Expand All @@ -124,6 +122,7 @@ describe('test/api.test.js', function () {
}
}
console.log(token);
done(new Error('没有捕捉到错误!'));
});
});

Expand Down Expand Up @@ -155,5 +154,5 @@ describe('test/api.test.js', function () {
// }
// _request();
//});
});
});

0 comments on commit ca68009

Please sign in to comment.