From 3099e77229ceb87fbdb87a7ab56f39dc942e4752 Mon Sep 17 00:00:00 2001 From: Kevin Qi Date: Sun, 17 Dec 2017 16:27:48 -0800 Subject: [PATCH] add test --- test/components/CircularProgressbar.spec.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/components/CircularProgressbar.spec.js b/test/components/CircularProgressbar.spec.js index e4fa0ac..bfb80ce 100644 --- a/test/components/CircularProgressbar.spec.js +++ b/test/components/CircularProgressbar.spec.js @@ -99,4 +99,19 @@ describe('CircularProgressbar props', () => { const expectedArcto = `a ${expectedRadius},${expectedRadius}`; assert(wrapper.find('.CircularProgressbar-path').prop('d').includes(expectedArcto)); }); + + it('counterClockwise', () => { + const clockwise = shallow( + + ); + const counterClockwise = shallow( + + ); + + assert.equal( + `-${clockwise.find('.CircularProgressbar-path').prop('style').strokeDashoffset}`, + counterClockwise.find('.CircularProgressbar-path').prop('style').strokeDashoffset, + 'counterclockwise should have the negative dashoffset of clockwise', + ); + }); });