aws-cdk
aws-cdk copied to clipboard
feat(integ-tests): chain assertion api calls
This PR does two things.
- Adds a helper method
then()
that makes it easier to chain assertion api calls together. Yes, it is possible to grab the underlyingnode
and calladdDependency
, but I thinkthen
is a more intuitive experience.
Look at integ.log-group.ts
to see where I updated a test from addDependency
-> then
- Added an
ApiCallBase
class and renamed the api call interface. This will make it easier to add more types of Api Calls in the future (HttpApiCall
coming soon*)
All Submissions:
- [ ] Have you followed the guidelines in our Contributing guide?
Adding new Unconventional Dependencies:
- [ ] This PR adds new unconventional dependencies following the process described here
New Features
- [ ] Have you added the new feature to an integration test?
- [ ] Did you use
yarn integ
to deploy the infrastructure and generate the snapshot (i.e.yarn integ
without--dry-run
)?
- [ ] Did you use
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license
Not sure if this is a huge problem, but thenable
objects are fairly well-formed in JS world. There's no reason why we can't have our own one. However they usually use a different signature: then(success: Callback, error: Callback)
with Callback
being a function of sorts.
It might be more clear to use something like chain()
or next()
like we do in Step Functions.
Not sure if this is a huge problem, but
thenable
objects are fairly well-formed in JS world. There's no reason why we can't have our own one. However they usually use a different signature:then(success: Callback, error: Callback)
withCallback
being a function of sorts.It might be more clear to use something like
chain()
ornext()
like we do in Step Functions.
That's a good point, i'll change it to next()
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).
AWS CodeBuild CI Report
- CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
- Commit ID: 59b46b216a00c8a2beac34ad0c8c82ecf7cc6c94
- Result: SUCCEEDED
- Build Logs (available for 30 days)
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).