Skip to content

Commit 71e5f5b

Browse files
feat: add initial samples (#2)
* feat: add initial samples See https://github.com/googleapis/repo-automation-bots/blob/master/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent b659911 commit 71e5f5b

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

contact-center-insights/test/quickstart.js

+8-12
Original file line numberDiff line numberDiff line change
@@ -21,33 +21,29 @@ const path = require('path');
2121
const cp = require('child_process');
2222
const {before, describe, it} = require('mocha');
2323
// 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');
2527
// eslint-disable-next-line no-unused-vars, node/no-missing-require
2628
const {assert} = require('chai');
2729

2830
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
2931

3032
const cwd = path.join(__dirname, '..');
3133

32-
const client = new {ContactCenterInsightsClient}();
34+
const client = new ContactCenterInsightsClient();
3335

3436
describe('Quickstart', () => {
35-
//TODO: remove this if not using the projectId
36-
// eslint-disable-next-line no-unused-vars
3737
let projectId;
3838

3939
before(async () => {
40-
// eslint-disable-next-line no-unused-vars
4140
projectId = await client.getProjectId();
4241
});
4342

4443
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, /\[\]/);
5248
});
5349
});

0 commit comments

Comments
 (0)