Skip to content

Instantly share code, notes, and snippets.

@PCreations
Created September 4, 2020 11:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PCreations/9b283d2599f2a7a968f009474ffed98e to your computer and use it in GitHub Desktop.
Save PCreations/9b283d2599f2a7a968f009474ffed98e to your computer and use it in GitHub Desktop.
const mockConfigUpdate = jest.fn();
const mockS3putObjectPromise = jest.fn().mockResolvedValue();
const mockS3putObject = jest.fn().mockImplementation(() => ({
promise: mockS3putObjectPromise,
}));
const mockS3 = jest.fn().mockImplementation(() => ({
putObject: mockS3putObject,
}));
const AWSMock = {
config: {
update: mockConfigUpdate,
},
S3: mockS3,
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment