की संपत्ति 'पता' नहीं पढ़ सकता है मुझे नोडजेस कोड पर परीक्षण के साथ मेरी समस्या का समाधान करने के लिए कुछ मदद चाहिए। मैं मोचा और सुपरटेस्ट का उपयोग कर रहा हूं। मैं supertest में कार्यान्वयन के साथ उलझन में हूँ। मैं इसे हल करने के लिए नहीं जानता। मैं एक फाइल डाउनलोड करने के लिए स्वचालित करने की कोशिश कर रहा हूँ।टाइपरर: अपरिभाषित सुपरटेस्ट
`describe('GET /entry/:entryId/file/:id/download', function(){
it('should pass download function', function(done){
this.timeout(15000);
request(app.webServer)
.get('/entry/543CGsdadtrE/file/wDRDasdDASAS/download')
.set('Authorization', 'Bearer eyJ0eXAiOiJKV1QiLCJhbGco')
.expect(200)
.end(function(err, res){
if (err) return done(err);
console.log(err, res);
done();
});
});
});
मैं पहले से ही शामिल हैं यह धन्यवाद मैं आशा है कि आप मदद कर सकते हैं मुझे भाई – Saitama
यह कहना है कि थेरेस /node-modules/supertest/lib/test.js के साथ एक समस्या। और जब मैं test.js को देखता हूं तो मुझे यह – Saitama
'Test.prototype.serverAddress = function (ऐप, पथ) { var addr = app.address(); अगर (! Addr) this._server = app.listen (0); var port = app.address() पोर्ट; var प्रोटोकॉल = ऐप उदाहरण https.Server? 'https': 'http'; रिटर्न प्रोटोकॉल + ': //127.0.0.1:' + पोर्ट + पथ; }; ' – Saitama