Skip to content

Commit

Permalink
code style improved
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Furter committed Mar 28, 2019
1 parent 894502d commit 67468b3
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions packages/web3-eth-contract/tests/src/AbstractContractTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,7 @@ describe('AbstractContractTest', () => {
});

const options = {fromBlock: true};
abstractContract.once('event', options, () => {
});
abstractContract.once('event', options, () => {});

expect(eventSubscriptionMock.unsubscribe).toHaveBeenCalled();

Expand All @@ -174,8 +173,7 @@ describe('AbstractContractTest', () => {

methodFactoryMock.createPastEventLogsMethod.mockReturnValueOnce(getPastLogsMethodMock);

await expect(abstractContract.getPastEvents('eventName', {}, () => {
})).resolves.toEqual(true);
await expect(abstractContract.getPastEvents('eventName', {}, () => {})).resolves.toEqual(true);

expect(abiModelMock.hasEvent).toHaveBeenCalledWith('eventName');

Expand All @@ -197,8 +195,7 @@ describe('AbstractContractTest', () => {

methodFactoryMock.createAllPastEventLogsMethod.mockReturnValueOnce(getPastLogsMethodMock);

await expect(abstractContract.getPastEvents('allEvents', {}, () => {
})).resolves.toEqual(true);
await expect(abstractContract.getPastEvents('allEvents', {}, () => {})).resolves.toEqual(true);

expect(getPastLogsMethodMock.execute).toHaveBeenCalled();

Expand All @@ -212,8 +209,7 @@ describe('AbstractContractTest', () => {
it('calls getPastEvents and returns a rejected promise', async () => {
abiModelMock.hasEvent.mockReturnValueOnce(false);

await expect(abstractContract.getPastEvents('eventName', {}, () => {
})).rejects.toThrow(
await expect(abstractContract.getPastEvents('eventName', {}, () => {})).rejects.toThrow(
'Event with name "eventName" does not exists.'
);

Expand Down

0 comments on commit 67468b3

Please sign in to comment.