두 개의 테스트 케이스 즉, "..와 전달해야합니다".. 그리고이 테스트는 "2000ms를 초과했습니다. 오류.2000ms의 타임 아웃이 mocha를 초과했습니다
describe("flickrphotoSearch", function() {
it("should pass with correct inputs", function (done) {
flickrApplication.flickrPhotoSearch("hello", "flickr_user_Key", 1, handleData);
function handleData(photoUrl, done) {
this.setTimeout(1500);
assert.isString(photoUrl.toString(), 'not a string');
setTimeout(done, 1000);
};
});
it("should fail with wrong key", function (callingDone) {
flickrApplication.flickrPhotoSearch("hello", "wrong key", 1, handleData);
function handleData(photoUrl, done) {
this.setTimeout(1500);
assert.equal(photoUrl.stat, "ok", photoUrl.message);
setTimeout(done, 1000);
};
});
});
첫 번째 테스트 시간 초과 오류가 발생하지만 두 번째 테스트는 좋은 실행 중입니다. 내가 틀린 곳을 말해주십시오.