Skip to content

Commit

Permalink
fix: default options to empty object
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored and bcoe committed Jun 5, 2019
1 parent 0f75d38 commit c04777d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/v1/datastore_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class DatastoreClient {
* API remote host.
*/
constructor(opts) {
opts = opts || {};
this._descriptors = {};

const servicePath =
Expand Down
10 changes: 5 additions & 5 deletions synth.metadata
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"updateTime": "2019-06-04T19:30:55.849433Z",
"updateTime": "2019-06-05T11:08:22.444988Z",
"sources": [
{
"generator": {
"name": "artman",
"version": "0.23.0",
"dockerImage": "googleapis/artman@sha256:846102ebf7ea2239162deea69f64940443b4147f7c2e68d64b332416f74211ba"
"version": "0.23.1",
"dockerImage": "googleapis/artman@sha256:9d5cae1454da64ac3a87028f8ef486b04889e351c83bb95e83b8fab3959faed0"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "0026f4b890ed9e2388fb0573c0727defa6f5b82e",
"internalRef": "251265049"
"sha": "4f3516a6f96dac182973a3573ff5117e8e4f76c7",
"internalRef": "251559960"
}
},
{
Expand Down
5 changes: 5 additions & 0 deletions test/gapic-v1.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ describe('DatastoreClient', () => {
assert(typeof port === 'number');
});

it('should create a client with no options', () => {
const client = new datastoreModule.v1.DatastoreClient();
assert(client);
});

describe('lookup', () => {
it('invokes lookup without error', done => {
const client = new datastoreModule.v1.DatastoreClient({
Expand Down

0 comments on commit c04777d

Please sign in to comment.