Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
estebanmino committed Jan 21, 2019
1 parent 74a92e0 commit 6dd7b69
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe('send-to-row container', () => {
to: 'mockTo:mockState',
toAccounts: 'mockToAccounts:mockState',
toDropdownOpen: 'mockToDropdownOpen:mockState',
tokens: 'mockTo:mockState',
tokens: 'mockTokens:mockState',
})
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,17 @@ describe('send-to-row selectors', () => {

assert.equal(sendToIsInError(state), false)
})
})

it('should return false if send.errors.to is falsy', () => {
describe('getTokens()', () => {
it('should return empty array if no tokens in state', () => {
const state = {
metamask: {
tokens: [],
},
}

assert.equal(getTokens(state), [])
assert.deepStrictEqual(getTokens(state), [])
})
})

})
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe('send-to-row utils', () => {
})

it('should return a known address recipient if to is truthy but part of state tokens', () => {
assert.deepEqual(getToErrorObject('0xabc123', null, false, ['0xabc123']), {
assert.deepEqual(getToErrorObject('0xabc123', undefined, false, [{'address': '0xabc123'}]), {
to: KNOWN_RECIPIENT_ADDRESS_ERROR,
})
})
Expand Down

0 comments on commit 6dd7b69

Please sign in to comment.