File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
google-analytics-data/test Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -28,12 +28,16 @@ const GA4_PROPERTY_ID = process.env.GA_TEST_PROPERTY_ID || '222596558';
2828const GOOGLE_APPLICATION_CREDENTIALS =
2929 process . env . GOOGLE_APPLICATION_CREDENTIALS ;
3030
31- describe ( 'Quickstart with json credentials' , ( ) => {
32- it ( 'should run quickstart' , async ( ) => {
33- // eslint-disable-next-line no-unused-vars
34- const stdout = execSync (
35- `node ./quickstart_json_credentials.js ${ GA4_PROPERTY_ID } ${ GOOGLE_APPLICATION_CREDENTIALS } `
36- ) ;
37- assert . match ( stdout , / R e p o r t r e s u l t / ) ;
31+ describe ( 'Quickstart with json credentials' , function ( ) {
32+ it ( 'should run quickstart if ADC env var set' , function ( ) {
33+ if ( process . env . GOOGLE_APPLICATION_CREDENTIALS ) {
34+ // eslint-disable-next-line no-unused-vars
35+ const stdout = execSync (
36+ `node ./quickstart_json_credentials.js ${ GA4_PROPERTY_ID } ${ GOOGLE_APPLICATION_CREDENTIALS } `
37+ ) ;
38+ assert . match ( stdout , / R e p o r t r e s u l t / ) ;
39+ } else {
40+ this . skip ( ) ;
41+ }
3842 } ) ;
3943} ) ;
You can’t perform that action at this time.
0 commit comments