From 1bf8caefe8730756125d957e4093ca6c7ece5c92 Mon Sep 17 00:00:00 2001 From: Eric Socolofsky Date: Tue, 17 Nov 2020 21:21:52 -0800 Subject: [PATCH] Rebase; update tests to match style --- packages/bar/tests/Bar.test.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/bar/tests/Bar.test.js b/packages/bar/tests/Bar.test.js index 27d201169..5a8167364 100644 --- a/packages/bar/tests/Bar.test.js +++ b/packages/bar/tests/Bar.test.js @@ -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)) }) @@ -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)) }) -