-
Notifications
You must be signed in to change notification settings - Fork 0
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
Error calling emptyBucket function. #9
Comments
@mfarrow701 Believe this is due to the use of https://github.com/xavier-thomas/aws-cfn-stack-cleanup/blob/master/src/s3.js#L63 Any alternatives here ? |
@xavier-thomas |
Because we are exporting |
@xavier-thomas, sure you can 😉 The |
And what's the best way of mocking this in the tests ? Since the tests are testing both functions separately. I need to mock the resolved value of emptyBucket() when called by the deleteBucket(). But the actual tests for the emptyBucket() should not mock the call. I realise that I can mock all the api calls, but I would rather test each function in isolation. |
@mfarrow701 Didn't have a lot of time to try the JS classes. Went instead with your option of splitting the modules. #11 This should get it working (🤞) , but feel free to try the class approach. |
SUMMARY
When invoking the lambda against a bucket, it throws the following error
Error during Cleanup - TypeError: Cannot read property 'emptyBucket' of undefined
ISSUE TYPE
VERSIONS
STEPS TO REPRODUCE
The text was updated successfully, but these errors were encountered: