Skip to content

Commit

Permalink
refactor: use execSync for tests
Browse files Browse the repository at this point in the history
refactor: use execSync for tests

#225 automerged by dpebot
  • Loading branch information
JustinBeckwith authored and yoshi-automation committed Apr 4, 2019
1 parent a8a0dfe commit 385c64d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion packages/google-cloud-language/samples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
},
"devDependencies": {
"chai": "^4.2.0",
"execa": "^1.0.0",
"mocha": "^6.0.0",
"uuid": "^3.2.1"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
'use strict';

const {assert} = require('chai');
const execa = require('execa');
const {execSync} = require('child_process');

describe('quickstart', () => {
it('should analyze sentiment in text', async () => {
const {stdout} = await execa.shell('node quickstart.js');
const stdout = execSync('node quickstart.js');
assert(stdout, /Text: Hello, world!/);
assert(stdout, /Sentiment score: /);
assert(stdout, /Sentiment magnitude: /);
Expand Down

0 comments on commit 385c64d

Please sign in to comment.