Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 3 additions & 1 deletion packages/common/src/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,11 @@ var PROJECT_ID_TOKEN = '{{projectId}}';
* @param {object} config - Configuration object.
* @param {string} config.baseUrl - The base URL to make API requests to.
* @param {string[]} config.scopes - The scopes required for the request.
* @param {object} options - [Configuration object](#/docs).
* @param {object=} options - [Configuration object](#/docs).
*/
function Service(config, options) {
options = options || {};

var reqCfg = extend({}, config, {
credentials: options.credentials,
keyFile: options.keyFilename,
Expand Down
6 changes: 6 additions & 0 deletions packages/common/test/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ describe('Service', function() {
});

describe('instantiation', function() {
it('should not require options', function() {
assert.doesNotThrow(function() {
new Service(CONFIG);
});
});

it('should create an authenticated request factory', function() {
var authenticatedRequest = {};

Expand Down