File tree 1 file changed +4
-5
lines changed
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 15
15
'use strict' ;
16
16
17
17
const { assert} = require ( 'chai' ) ;
18
- const { execSync } = require ( 'child_process' ) ;
18
+ const cp = require ( 'child_process' ) ;
19
19
const supertest = require ( 'supertest' ) ;
20
20
const app = require ( '../app.js' ) ;
21
21
const request = supertest ( app ) ;
22
22
23
+ const execSync = cmd => cp . execSync ( cmd , { encoding : 'utf-8' } ) ;
24
+
23
25
const PROJECT_ID = process . env . GCLOUD_PROJECT ;
24
26
const LOCATION_ID = process . env . LOCATION_ID || 'us-central1' ;
25
27
const SERVICE_ID = 'my-service' ;
@@ -32,10 +34,7 @@ describe('Cloud Scheduler Sample Tests', () => {
32
34
`node createJob.js ${ PROJECT_ID } ${ LOCATION_ID } ${ SERVICE_ID } `
33
35
) ;
34
36
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 ( ) ;
39
38
} ) ;
40
39
41
40
it ( 'should delete a scheduler job' , async ( ) => {
You can’t perform that action at this time.
0 commit comments