Skip to content

Commit a4ce702

Browse files
stephenpluspluscallmehiphop
authored andcommitted
tests: fix assert.throws() usage (#1468)
1 parent b62cc29 commit a4ce702

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • packages/google-cloud-translate/test

packages/google-cloud-translate/test/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ describe('Translate', function() {
8181
it('should throw if an API key is not provided', function() {
8282
assert.throws(function() {
8383
new Translate({});
84-
}, 'An API key is required to use the Translate API.');
84+
}, /An API key is required to use the Translate API\./);
8585
});
8686

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

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

0 commit comments

Comments
 (0)