@@ -21,33 +21,29 @@ const path = require('path');
21
21
const cp = require ( 'child_process' ) ;
22
22
const { before, describe, it} = require ( 'mocha' ) ;
23
23
// eslint-disable-next-line node/no-missing-require
24
- const { ContactCenterInsightsClient} = require ( '@google-cloud/contact-center-insights' ) ;
24
+ const {
25
+ ContactCenterInsightsClient,
26
+ } = require ( '@google-cloud/contact-center-insights' ) ;
25
27
// eslint-disable-next-line no-unused-vars, node/no-missing-require
26
28
const { assert} = require ( 'chai' ) ;
27
29
28
30
const execSync = cmd => cp . execSync ( cmd , { encoding : 'utf-8' } ) ;
29
31
30
32
const cwd = path . join ( __dirname , '..' ) ;
31
33
32
- const client = new { ContactCenterInsightsClient} ( ) ;
34
+ const client = new ContactCenterInsightsClient ( ) ;
33
35
34
36
describe ( 'Quickstart' , ( ) => {
35
- //TODO: remove this if not using the projectId
36
- // eslint-disable-next-line no-unused-vars
37
37
let projectId ;
38
38
39
39
before ( async ( ) => {
40
- // eslint-disable-next-line no-unused-vars
41
40
projectId = await client . getProjectId ( ) ;
42
41
} ) ;
43
42
44
43
it ( 'should run quickstart' , async ( ) => {
45
- //TODO: remove this line
46
- // eslint-disable-next-line no-unused-vars
47
- const stdout = execSync (
48
- `node ./quickstart.js` ,
49
- { cwd}
50
- ) ;
51
- //assert(stdout, stdout !== null);
44
+ const stdout = execSync ( `node ./quickstart.js ${ projectId } us-central1` , {
45
+ cwd,
46
+ } ) ;
47
+ assert . match ( stdout , / \[ \] / ) ;
52
48
} ) ;
53
49
} ) ;
0 commit comments