forked from alertlogic/paws-collector
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade aws-sdk v2 to v3 with callback and fixed the functionality
- Loading branch information
Rakhi Mundhada
authored and
Rakhi Mundhada
committed
Nov 3, 2023
1 parent
4a10d4d
commit fd1ec7f
Showing
4 changed files
with
207 additions
and
127 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const sinon = require('sinon'); | ||
const sandbox = sinon.createSandbox(); | ||
function mock(service, methodName, callback) { | ||
return sandbox.stub(service.prototype, methodName).callsFake(callback); | ||
} | ||
|
||
function restore(serviceName, methodName) { | ||
serviceName.prototype[methodName].restore(); | ||
} | ||
|
||
module.exports = { | ||
mock: mock, | ||
restore: restore | ||
}; |
Oops, something went wrong.