我怎样才能看到这个功能:http ://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#copyObject-property
copyObject(params = {}, callback) ⇒ AWS.Request
被定义为?
我尝试了什么:
var AWS = require('aws-sdk');
AWS.S3.prototype.copyObject
=> undefined
但这是未定义的
我想知道它,因为我想用proxyquire
:
var aws_stub = {};
var Mover = proxyquire('../../callback/mover',
{'aws-sdk': aws_stub}
).Mover;
var fake_aws_copyObject = function(params, func){func(null, "succeed")};
fake_aws_copyObject_stub = sinon.spy(fake_aws_copyObject);
aws_stub.AWS.S3 ... ?? = fake_aws_copyObject_stub;