mirror of
https://github.com/kevinsqi/react-circular-progressbar.git
synced 2026-01-18 15:55:06 +00:00
Add strokeWidth test
This commit is contained in:
parent
5485f66c0e
commit
2cb09bb66e
@ -1,9 +1,30 @@
|
||||
import React from 'react';
|
||||
import { assert } from 'chai';
|
||||
import { shallow } from 'enzyme';
|
||||
|
||||
import CircularProgressbar from '../../src';
|
||||
|
||||
describe('CircularProgressbar', () => {
|
||||
it('should not throw exceptions in base case', () => {
|
||||
assert.doesNotThrow(() => <CircularProgressbar />);
|
||||
});
|
||||
|
||||
it('should render as an svg', () => {
|
||||
const wrapper = shallow(
|
||||
<CircularProgressbar percentage={50} />
|
||||
);
|
||||
assert.equal(1, wrapper.find('svg').length);
|
||||
});
|
||||
});
|
||||
|
||||
describe('CircularProgressbar props', () => {
|
||||
it('strokeWidth', () => {
|
||||
const wrapper = shallow(
|
||||
<CircularProgressbar
|
||||
percentage={50}
|
||||
strokeWidth={2}
|
||||
/>
|
||||
);
|
||||
assert.equal(2, wrapper.find('.CircularProgressbar-path').prop('strokeWidth'));
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user