Skip to content

Commit

Permalink
tests: fix assert.throws() usage (#1468)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenplusplus authored and callmehiphop committed Aug 16, 2016
1 parent b62cc29 commit a4ce702
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/google-cloud-translate/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ describe('Translate', function() {
it('should throw if an API key is not provided', function() {
assert.throws(function() {
new Translate({});
}, 'An API key is required to use the Translate API.');
}, /An API key is required to use the Translate API\./);
});

it('should localize the options', function() {
Expand Down Expand Up @@ -266,7 +266,7 @@ describe('Translate', function() {
it('should throw if `to` is not provided', function() {
assert.throws(function() {
translate.translate(INPUT, { from: SOURCE_LANG_CODE }, util.noop);
}, 'A target language is required to perform a translation.');
}, /A target language is required to perform a translation\./);
});

it('should make the correct API request', function(done) {
Expand Down

0 comments on commit a4ce702

Please sign in to comment.