From 015be8bdd99c9d9ef17e62c523cb72103e3d32c8 Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Thu, 4 Apr 2019 18:39:53 -0700 Subject: [PATCH] refactor: wrap execSync with encoding: utf-8 (#226) --- .../google-cloud-language/samples/test/quickstart.test.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-language/samples/test/quickstart.test.js b/packages/google-cloud-language/samples/test/quickstart.test.js index be26e4228de..b2e879dc9b3 100644 --- a/packages/google-cloud-language/samples/test/quickstart.test.js +++ b/packages/google-cloud-language/samples/test/quickstart.test.js @@ -16,7 +16,9 @@ 'use strict'; const {assert} = require('chai'); -const {execSync} = require('child_process'); +const cp = require('child_process'); + +const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); describe('quickstart', () => { it('should analyze sentiment in text', async () => {