Last active
February 18, 2019 03:45
-
-
Save marat-chardymov/de460699b81b2307b60f531bfa35b9d8 to your computer and use it in GitHub Desktop.
Sinon.js : How to stub any instance of a class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const kinesisResponse = { | |
FailedRecordCount: 0, | |
Records: [{ SequenceNumber: 'test-sequence-number', ShardId: 'test-ShardId' }], | |
}; | |
sinon.stub(KinesisClient.prototype, 'recordToKinesisStream').returns(Promise.resolve(kinesisResponse)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment