2
TDDを使用して自分のコードをテストしています。QUESTテストでasync()アサーションでassert testが失敗しました
コードは以下の通りである -
QUnit.test("Testing submitApi", function (assert) {
// createSampleSheet();
BWUser.authenticate().done(function() {
BWTableProperties.readAllTableProperties().then(function (allTableProperties) {
for (var i = 0; i < allTableProperties.length; i++) {
var getResult = Submit.submitApi(allTableProperties[i], "test", 0); //getResult is Promise
getResult.then(function() {
var promise = assert.async();
var promisedone = makeQuerablePromise(getResult);// gives whether promise resolved or not
promisedone.then(function() {
assert.equal(promisedone.isFulfilled(), true, "Promise should be resolved");
promise();
});
});
}
});
});
});
私はテストを実行したときに、それは次のエラーを示しています。誰もが、ここで間違った第一印象のIを行ったものを提案することができ
Expected at least one assertion, but none were run - call expect(0) to accept zero assertions.
をforループのためにエラーがあるかもしれないと感じるが、わからない。 ?