Skip to content

Commit

Permalink
remove done callback from async await methods
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdschwrtz committed Nov 12, 2017
1 parent d889b9c commit 861041c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 2 additions & 4 deletions __tests__/components/Claim.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ describe('Claim', () => {
})

describe('when do gas claim button is clicked', () => {
test('should dispatch transaction failure event', async (done) => {
test('should dispatch transaction failure event', async () => {
const { wrapper, store } = setup()
neonjs.doSendAsset = jest.fn(() => {
return new Promise((resolve, reject) => {
Expand All @@ -92,10 +92,9 @@ describe('Claim', () => {
},
type: 'SHOW_NOTIFICATION'
})
done()
})

test('should dispatch transaction waiting, set claim request and disable claim event', async (done) => {
test('should dispatch transaction waiting, set claim request and disable claim event', async () => {
const { wrapper, store } = setup()
neonjs.doSendAsset = jest.fn(() => {
return new Promise((resolve, reject) => {
Expand Down Expand Up @@ -124,7 +123,6 @@ describe('Claim', () => {
})
expect(actions[2]).toEqual(setClaimRequest(true))
expect(actions[3]).toEqual(disableClaim(true))
done()
})
})
})
3 changes: 1 addition & 2 deletions __tests__/components/NetworkSwitch.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe('NetworkSwitch', () => {
done()
})

test('switches to TestNet when clicked', async (done) => {
test('switches to TestNet when clicked', async () => {
const { wrapper, store } = setup()
const state = store.getState()
const deepWrapper = wrapper.dive()
Expand All @@ -77,6 +77,5 @@ describe('NetworkSwitch', () => {
expect(actionTypes.indexOf(action.type) > -1).toEqual(true)
})
expect(actions.length).toEqual(5)
done()
})
})

0 comments on commit 861041c

Please sign in to comment.