Instantly share code, notes, and snippets.

Embed
What would you like to do?
const stubs = require('./aws-stubs');
const AWS = {};
AWS.config = {
setPromisesDependency: (arg) => {}
};
AWS.S3 = function() {
}
AWS.S3.prototype = {
...AWS.S3.prototype,
// Stub for the listObjectsV2 method in the sdk
listObjectsV2(params){
const stubPromise = new Promise((resolve, reject) => {
resolve(stubs.listObjects);
});
return {
promise: () => {
return stubPromise;
}
}
}
};
module.exports = AWS;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment