Skip to content

Commit

Permalink
Use a real Error in tests. (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdobry authored and Ace Nassri committed Nov 17, 2022
1 parent d5b30b3 commit b33e6d7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions translate/test/translate.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ describe('translate:translate', function () {
});

it('should handle error', function () {
var error = 'error';
var error = new Error('error');
var sample = getSample();
var callback = sinon.stub();
sample.mocks.translate.detect = sinon.stub().callsArgWith(1, error);
Expand Down Expand Up @@ -100,7 +100,7 @@ describe('translate:translate', function () {
});

it('should handle error', function () {
var error = 'error';
var error = new Error('error');
var sample = getSample();
var callback = sinon.stub();
sample.mocks.translate.getLanguages = sinon.stub().callsArgWith(0, error);
Expand Down Expand Up @@ -141,7 +141,7 @@ describe('translate:translate', function () {
});

it('should handle error', function () {
var error = 'error';
var error = new Error('error');
var sample = getSample();
var callback = sinon.stub();
var options = {
Expand Down

0 comments on commit b33e6d7

Please sign in to comment.