Skip to content

Commit

Permalink
refactor: wrap execSync with encoding: utf-8 (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkwlui authored and JustinBeckwith committed Apr 5, 2019
1 parent 944aa05 commit 2a11d31
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion texttospeech/test/audioProfile.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@

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

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

const cmd = 'node audioProfile.js';
const text = 'Hello Everybody! This is an Audio Profile Optimized Sound Byte.';
Expand Down
4 changes: 3 additions & 1 deletion texttospeech/test/listVoices.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'});

const cmd = 'node listVoices.js';

Expand Down
4 changes: 3 additions & 1 deletion texttospeech/test/quickstart.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@

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

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

const outputFile = 'output.mp3';

Expand Down
4 changes: 3 additions & 1 deletion texttospeech/test/synthesize.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
const fs = require('fs');
const path = require('path');
const {assert} = require('chai');
const {execSync} = require('child_process');
const cp = require('child_process');

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

const cmd = 'node synthesize.js';
const text = 'Hello there.';
Expand Down

0 comments on commit 2a11d31

Please sign in to comment.