New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sinon fake parameters aren't passed after 5.5.1 #336
Comments
I have a second related issue where I'm using a fake to prevent the SDK from executing a call during testing. // service mock to prevent notification callout
AWS.mock('SNS', 'publish', sinon.fake()) The fake provides no return value/undefined so |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is related to the fix applied for #256. I spent some time upgrading through releases to find the behavior was working through version 5.5.0 and stopped working with 5.5.1. This may or may not be related to #273.
In my case I was using a fake to implement behavior as follows:
The changes in #257 result in the constructed callback spy being passed as the parameters to the fake rather than the parameters to the mocked function.
If I change the fake to accept an extra, unused parameter like this:
const createDBSnapshotMock = sinon.fake((params, cb) => {
then it results in the parameters being passed as expected sincereplace.length === 2
.I'm not sure what the proper behavior is in this case and if the second argument for the fake parameters is required.
The text was updated successfully, but these errors were encountered: