This commit is contained in:
Kevin Qi 2017-12-17 16:27:48 -08:00
parent 4db3282747
commit 3099e77229

View File

@ -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(
<CircularProgressbar percentage={50} />
);
const counterClockwise = shallow(
<CircularProgressbar percentage={50} counterClockwise />
);
assert.equal(
`-${clockwise.find('.CircularProgressbar-path').prop('style').strokeDashoffset}`,
counterClockwise.find('.CircularProgressbar-path').prop('style').strokeDashoffset,
'counterclockwise should have the negative dashoffset of clockwise',
);
});
});