Skip to content

Instantly share code, notes, and snippets.

@lennym
Created July 28, 2016 13:53
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 lennym/93f0b9803d30fa2dc3b5a1e609bb8d56 to your computer and use it in GitHub Desktop.
Save lennym/93f0b9803d30fa2dc3b5a1e609bb8d56 to your computer and use it in GitHub Desktop.
const simple = require('simple-mock');
const AWS = require('aws-sdk');
const S3 = (new AWS.S3()).constructor.prototype;
describe('store', () => {
beforeEach(() => {
simple.mock(S3, 'getObject').callbackWith(null, mockResult);
});
afterEach(() => {
simple.restore();
});
// ...
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment