File tree Expand file tree Collapse file tree 4 files changed +12
-4
lines changed
cloud-language/snippets/test Expand file tree Collapse file tree 4 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -19,9 +19,11 @@ const fs = require('fs');
1919const path = require ( 'path' ) ;
2020const { Storage} = require ( '@google-cloud/storage' ) ;
2121const { assert} = require ( 'chai' ) ;
22- const { execSync } = require ( 'child_process' ) ;
22+ const cp = require ( 'child_process' ) ;
2323const uuid = require ( 'uuid' ) ;
2424
25+ const execSync = cmd => cp . execSync ( cmd , { encoding : 'utf-8' } ) ;
26+
2527describe ( 'analyze.v1' , ( ) => {
2628 const storage = new Storage ( ) ;
2729 const cmd = 'node analyze.v1.js' ;
Original file line number Diff line number Diff line change @@ -19,9 +19,11 @@ const fs = require('fs');
1919const path = require ( 'path' ) ;
2020const { Storage} = require ( '@google-cloud/storage' ) ;
2121const { assert} = require ( 'chai' ) ;
22- const { execSync } = require ( 'child_process' ) ;
22+ const cp = require ( 'child_process' ) ;
2323const uuid = require ( 'uuid' ) ;
2424
25+ const execSync = cmd => cp . execSync ( cmd , { encoding : 'utf-8' } ) ;
26+
2527const storage = new Storage ( ) ;
2628const cmd = 'node analyze.v1beta2.js' ;
2729const bucketName = `nodejs-docs-samples-test-${ uuid . v4 ( ) } ` ;
Original file line number Diff line number Diff line change 1616'use strict' ;
1717
1818const { assert} = require ( 'chai' ) ;
19- const { execSync} = require ( 'child_process' ) ;
19+ const cp = require ( 'child_process' ) ;
20+
21+ const execSync = cmd => cp . execSync ( cmd , { encoding : 'utf-8' } ) ;
2022
2123const cmdDataset = 'node automl/automlNaturalLanguageDataset.js' ;
2224const cmdModel = 'node automl/automlNaturalLanguageModel.js' ;
Original file line number Diff line number Diff line change 1616'use strict' ;
1717
1818const { assert} = require ( 'chai' ) ;
19- const { execSync} = require ( 'child_process' ) ;
19+ const cp = require ( 'child_process' ) ;
20+
21+ const execSync = cmd => cp . execSync ( cmd , { encoding : 'utf-8' } ) ;
2022
2123describe ( 'quickstart' , ( ) => {
2224 it ( 'should analyze sentiment in text' , async ( ) => {
You can’t perform that action at this time.
0 commit comments