diff --git a/speech/system-test/recognize.test.js b/speech/system-test/recognize.test.js index 7da66d5031..870caeebfa 100644 --- a/speech/system-test/recognize.test.js +++ b/speech/system-test/recognize.test.js @@ -21,7 +21,7 @@ describe('speech:recognize', function () { recognizeExample.main( path.join(__dirname, '../resources/audio.raw'), function (err, result) { - assert(!err); + assert.ifError(err); assert(result); assert(Array.isArray(result.results)); assert(result.results.length === 1); diff --git a/speech/system-test/recognize_streaming.test.js b/speech/system-test/recognize_streaming.test.js index 0d008d0c1c..b155cf426e 100644 --- a/speech/system-test/recognize_streaming.test.js +++ b/speech/system-test/recognize_streaming.test.js @@ -22,7 +22,7 @@ describe('speech:recognize_streaming', function () { path.join(__dirname, '../resources/audio.raw'), process.env.SPEECH_API_HOST || 'speech.googleapis.com', function (err, results) { - assert(!err); + assert.ifError(err); assert(results); assert(results.length === 3); assert(results[0].results);