Skip to content

Commit

Permalink
Rebase; update tests to match style
Browse files Browse the repository at this point in the history
  • Loading branch information
ericsoco committed Nov 18, 2020
1 parent 15106c2 commit 1bf8cae
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/bar/tests/Bar.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,9 @@ it(`should apply scale rounding by default`, () => {
animate={false}
/>
)
const firstBarWidth = wrapper.find('g rect').first(3).props().width

const bars = wrapper.find('BarItem')
const firstBarWidth = bars.at(0).prop('width')
expect(firstBarWidth).toEqual(Math.floor(firstBarWidth))
})

Expand All @@ -382,7 +384,8 @@ it(`should not apply scale rounding when passed indexedScale.round: false`, () =
indexedScale={{ type: 'indexed', round: false }}
/>
)
const firstBarWidth = wrapper.find('g rect').first(3).props().width

const bars = wrapper.find('BarItem')
const firstBarWidth = bars.at(0).prop('width')
expect(firstBarWidth).not.toEqual(Math.floor(firstBarWidth))
})

0 comments on commit 1bf8cae

Please sign in to comment.