我的ajax电话没有回复任何东西!这是我的代码:
// /test/bootstrap.test.js
var Sails = require('sails'),
sails;
before(function(done) {
// Increase the Mocha timeout so that Sails has enough time to lift.
this.timeout(5000);
Sails.lift({
// configuration for testing purposes
}, function(err, server) {
sails = server;
if (err) return done(err);
// here you can load fixtures, etc.
done(err, sails);
});
});
after(function(done) {
// here you can clear fixtures, etc.
Sails.lower(done);
});
即使网络调用成功,我可以看到响应中包含数据,控制台也会记录“未定义”!发生了什么事?