Tag: 重新

Supertest +确定gzipResponsefile upload

我越来越 TypeError: Cannot read property 'status' of undefined 当试图上传一个文件使用supertest到一个简单的restify服务器,打开gzipResponse 。 版本等: $ npm list | grep 'super\|mocha\|restify' ├─┬ mocha@2.4.5 ├─┬ restify@4.0.4 └─┬ supertest@1.2.0 └─┬ superagent@1.8.3 $ node -v v5.5.0 服务器: const restify = require('restify'); const server = restify.createServer(); server.use(restify.gzipResponse()); server.put('image', (req, res) => { res.send(200); }); module.exports = server; 考试: const request = require('supertest'); const […]