Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Commit

Permalink
Merge pull request #585 from LiskHQ/582-promise-rejection-warnings
Browse files Browse the repository at this point in the history
Fix UnhandledPromiseRejectionWarning - closes #582
  • Loading branch information
shuse2 authored Jul 30, 2018
2 parents 815ac89 + fa06c45 commit 21d3f83
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions test/utils/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,9 @@ describe('query utils', () => {
return Promise.resolve();
});

it('should call API client', () => {
return expect(apiClient.accounts.get).to.be.calledWithExactly(
defaultParameters,
);
});
it('should call API client and should reject with an error', () => {
expect(apiClient.accounts.get).to.be.calledWithExactly(defaultParameters);

it('should reject with an error', () => {
return expect(queryResult).to.be.rejectedWith(
Error,
'No data was returned.',
Expand All @@ -77,13 +73,9 @@ describe('query utils', () => {
return Promise.resolve();
});

it('should call API client', () => {
return expect(apiClient.accounts.get).to.be.calledWithExactly(
defaultParameters,
);
});
it('should call API client and should reject with an error', () => {
expect(apiClient.accounts.get).to.be.calledWithExactly(defaultParameters);

it('should reject with an error', () => {
return expect(queryResult).to.be.rejectedWith(
Error,
'No accounts found using specified parameters.',
Expand Down

0 comments on commit 21d3f83

Please sign in to comment.