Skip to content

Commit

Permalink
speech: add operation test (#1794)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenplusplus authored Nov 16, 2016
1 parent 5ad7894 commit 5cd91be
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/google-cloud-speech/system-test/speech.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,16 @@ describe('Speech', function() {
.on('complete', assertSimplifiedResponseOperation(done));
});
});

it('runs operation as a promise', function() {
var uri = AUDIO_FILES.bridge.httpUri;

return speech.startRecognition(uri, OPTIONS)
.then(function(response) {
var operation = response[0];
return operation.promise();
});
});
});

describe('createRecognizeStream', function() {
Expand Down

0 comments on commit 5cd91be

Please sign in to comment.