Skip to content

Commit

Permalink
Fix unit test failed introduced by brave#8075
Browse files Browse the repository at this point in the history
Auditors: @bbondy, @NejcZdovc
  • Loading branch information
darkdh committed Jun 13, 2017
1 parent 7ce06ee commit 5e16c50
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/unit/app/browser/reducers/sitesReducerTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ describe('sitesReducerTest', function () {
destinationKey: `${url2}|0|0`
}

// Sites will be sorted after each site operation. ex. sites[0] will be
// order 0, sites[1] will be order 1, ...etc.

// Add sites
let newState = sitesReducer(state, addAction)
addAction.siteDetail = addAction.siteDetail.set('location', 'https://www.brave.com/2')
Expand All @@ -149,8 +152,8 @@ describe('sitesReducerTest', function () {
moveAction.prepend = true
newState = sitesReducer(Immutable.fromJS(newState), moveAction).toJS()
assert.equal(Object.keys(newState.sites).length, 3)
assert.equal(Object.values(newState.sites)[2].location, url)
assert.equal(Object.values(newState.sites)[2].order, 1)
assert.equal(Object.values(newState.sites)[1].location, url)
assert.equal(Object.values(newState.sites)[1].order, 1)
})
})
})

0 comments on commit 5e16c50

Please sign in to comment.