-
Notifications
You must be signed in to change notification settings - Fork 113
feat(samples): Adding code samples and tests for them #560
Conversation
Here is the summary of changes. You are about to add 7 region tags.
You are about to delete 1 region tag.
This comment is generated by snippet-bot.
|
Thanks for submitting more samples. Ideally each function should be in its own file, not inside |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each function should be in its own file. With a non-async main
function and the last line in the file should be main(...process.argv.slice(2));
.
@fhinkel could you please review again? |
samples/waitForOperation.js
Outdated
* @param {string} projectId - ID or number of the project you want to use. | ||
* @param {Operation} operation - Operation instance you want to wait. | ||
*/ | ||
function main(projectId, operation) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure how to test this file, cause we need to pass operation object from CLI params
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just pass the params needed to create an operation
object and create it inside main
.
Can you fix the license header violations please. |
samples/mailjet.js
Outdated
|
||
'use strict'; | ||
|
||
// [START send] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use proper product naming for the tag please. Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its just copy of current files. should i change them to new one?
https://github.com/googleapis/nodejs-compute/blob/master/samples/mailjet.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to correct the old files as well. New files have to pass the license header and tag checks, otherwise we can't merge.
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> 🦕