Skip to content

Commit

Permalink
feat: add initial samples (#2)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
sofisl and gcf-owl-bot[bot] authored Jul 1, 2021
1 parent b659911 commit 71e5f5b
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions contact-center-insights/test/quickstart.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,33 +21,29 @@ const path = require('path');
const cp = require('child_process');
const {before, describe, it} = require('mocha');
// eslint-disable-next-line node/no-missing-require
const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights');
const {
ContactCenterInsightsClient,
} = require('@google-cloud/contact-center-insights');
// eslint-disable-next-line no-unused-vars, node/no-missing-require
const {assert} = require('chai');

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

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

const client = new {ContactCenterInsightsClient}();
const client = new ContactCenterInsightsClient();

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

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

it('should run quickstart', async () => {
//TODO: remove this line
// eslint-disable-next-line no-unused-vars
const stdout = execSync(
`node ./quickstart.js`,
{cwd}
);
//assert(stdout, stdout !== null);
const stdout = execSync(`node ./quickstart.js ${projectId} us-central1`, {
cwd,
});
assert.match(stdout, /\[\]/);
});
});

0 comments on commit 71e5f5b

Please sign in to comment.