mirror of
https://github.com/kevinsqi/react-circular-progressbar.git
synced 2026-01-18 15:55:06 +00:00
add test
This commit is contained in:
parent
4db3282747
commit
3099e77229
@ -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',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user