Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Added method comment; Better check for API key argument
  • Loading branch information
Hiranya Jayathilaka committed May 11, 2017
commit 97390342f704e4f8b1648f078d93d811fa39c170
9 changes: 7 additions & 2 deletions test/integration/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ try {
}

var apiKey = process.argv[2];
if (apiKey == undefined) {
if (typeof apiKey === 'undefined') {
console.log(chalk.red(
'The integration test suite requires a API key for a ' +
'The integration test suite requires an API key for a ' +
'Firebase project to be specified as a command-line argument.'));
process.exit(1);
}
Expand All @@ -62,6 +62,11 @@ function getProjectId() {
return serviceAccount.project_id;
}

/**
* Returns the API key of the project the integration tests are executed against.
*
* @return {string} A Firebase API key.
*/
function getApiKey() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: add javadoc for this function like you did for the ones above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

return apiKey;
}
Expand Down