File tree Expand file tree Collapse file tree 3 files changed +11
-10
lines changed
Expand file tree Collapse file tree 3 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,8 @@ const uuid = require('uuid');
2424// Get a reference to the Cloud Storage component
2525const storage = require ( '@google-cloud/storage' ) ( ) ;
2626// Get a reference to the BigQuery component
27- const bigquery = require ( '@google-cloud/bigquery' ) ( ) ;
27+ const { BigQuery} = require ( '@google-cloud/bigquery' ) ;
28+ const bigquery = new BigQuery ( ) ;
2829// [END functions_sendgrid_setup]
2930
3031// [START functions_sendgrid_get_client]
Original file line number Diff line number Diff line change 1515 "test" : " ava -T 20s --verbose test/*.test.js"
1616 },
1717 "dependencies" : {
18- "@google-cloud/bigquery" : " 0.12 .0" ,
19- "@google-cloud/storage" : " 1.7.0" ,
20- "safe-buffer" : " 5.1.2" ,
21- "sendgrid" : " 5.2.3" ,
22- "uuid" : " 3.3.2"
18+ "@google-cloud/bigquery" : " ^2.0 .0" ,
19+ "@google-cloud/storage" : " ^ 1.7.0" ,
20+ "safe-buffer" : " ^ 5.1.2" ,
21+ "sendgrid" : " ^ 5.2.3" ,
22+ "uuid" : " ^ 3.3.2"
2323 },
2424 "devDependencies" : {
2525 "@google-cloud/nodejs-repo-tools" : " ^2.3.0" ,
26- "ava" : " 0.25.0" ,
27- "proxyquire" : " 2.1.0" ,
28- "sinon" : " 4.0.2"
26+ "ava" : " ^ 0.25.0" ,
27+ "proxyquire" : " ^ 2.1.0" ,
28+ "sinon" : " ^ 4.0.2"
2929 },
3030 "cloud-repo-tools" : {
3131 "requiresKeyFile" : true ,
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ function getSample() {
8484 const dataset = { table : sinon . stub ( ) . returns ( table ) } ;
8585 dataset . get = sinon . stub ( ) . returns ( Promise . resolve ( [ dataset ] ) ) ;
8686 const bigquery = { dataset : sinon . stub ( ) . returns ( dataset ) } ;
87- const BigQueryMock = sinon . stub ( ) . returns ( bigquery ) ;
87+ const BigQueryMock = sinon . stub ( ) . returns ( { BigQuery : bigquery } ) ;
8888 const StorageMock = sinon . stub ( ) . returns ( storage ) ;
8989 const sendgrid = sinon . stub ( ) . returns ( client ) ;
9090 const uuid = { v4 : sinon . stub ( ) } ;
You can’t perform that action at this time.
0 commit comments