Skip to content
This repository was archived by the owner on Jan 7, 2020. It is now read-only.

Conversation

konsumer
Copy link

This is a simple start to some unit-tests, that illustrates how to mock AWS and check the params that were passed to it, fairly easily. For some reason sqs doesn't have sqs.client.sendMessage.calls set, after being mocked (maybe some kind of dynamic-load that works different than the others?) Regardless, it has 1 unit-test to assert there are tests (basic jest usage example) and 1 simple mocking unit-test (to illustrate how mocks work.) I also added a .gitignore.

@konsumer
Copy link
Author

Actually, I fixed the sqs.client.sendMessage.calls thing, it should be sqs.client.sendMessage.mock.calls, so this should be ready.

@konsumer
Copy link
Author

This is meant as a nice starting-point for someone more familiar with the underlying API (@benjie ?) to fill in the other tests. I'd be happy to add travis-config for CI, and even flesh out more tests, if no one else wants to do it, it might just take me a bit longer.

@konsumer konsumer mentioned this pull request Nov 28, 2019
@benjie
Copy link
Owner

benjie commented Dec 17, 2019

Hey @konsumer thanks for the PRs! This project has virtually no interest (as can be seen by the almost zero download count on npm) and I've not touched it in 7 years. Please feel free to fork it and release your own version; I would be happy to archive the repo and point the README at your new version.

@konsumer
Copy link
Author

Haha. no prob. thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants