1
私はChai.jsを使用しています。私はこれは私がCannot read property 'least' of undefined
ChaijsアサーションでlengthOf.at.leastを使用
を言って、エラーメッセージを取得し合格しない以下のアサーション
it('Expects subjects in the response body',() => {
expect(response.body).to.be.an('object').that.includes.key("subjects");
expect(response.body.subjects).to.be.an('array').that.has.lengthOf.at.least(1);
});
を持っている。しかし、以下では正常に動作します。
it('Expects subjects in the response body',() => {
expect(response.body).to.be.an('object').that.includes.key("subjects");
expect(response.body.subjects).to.be.an('array').that.has.lengthOf(10);
});
どうして私は.at.least()
を間違って使用していますか?