File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 1515'use strict' ;
1616
1717const { assert} = require ( 'chai' ) ;
18- const { execSync } = require ( 'child_process' ) ;
18+ const cp = require ( 'child_process' ) ;
1919const supertest = require ( 'supertest' ) ;
2020const app = require ( '../app.js' ) ;
2121const request = supertest ( app ) ;
2222
23+ const execSync = cmd => cp . execSync ( cmd , { encoding : 'utf-8' } ) ;
24+
2325const PROJECT_ID = process . env . GCLOUD_PROJECT ;
2426const LOCATION_ID = process . env . LOCATION_ID || 'us-central1' ;
2527const SERVICE_ID = 'my-service' ;
@@ -32,10 +34,7 @@ describe('Cloud Scheduler Sample Tests', () => {
3234 `node createJob.js ${ PROJECT_ID } ${ LOCATION_ID } ${ SERVICE_ID } `
3335 ) ;
3436 assert . match ( stdout , / C r e a t e d j o b / ) ;
35- jobName = stdout
36- . toString ( )
37- . split ( '/' )
38- . pop ( ) ;
37+ jobName = stdout . split ( '/' ) . pop ( ) ;
3938 } ) ;
4039
4140 it ( 'should delete a scheduler job' , async ( ) => {
You can’t perform that action at this time.
0 commit comments