From 2cb09bb66e4dfcc3135d14b5bbca8659361e2890 Mon Sep 17 00:00:00 2001 From: Kevin Qi Date: Sat, 4 Feb 2017 21:14:18 -0800 Subject: [PATCH] Add strokeWidth test --- test/components/CircularProgressbar.spec.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/test/components/CircularProgressbar.spec.js b/test/components/CircularProgressbar.spec.js index 2b3b820..5896bc1 100644 --- a/test/components/CircularProgressbar.spec.js +++ b/test/components/CircularProgressbar.spec.js @@ -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(() => ); }); + + it('should render as an svg', () => { + const wrapper = shallow( + + ); + assert.equal(1, wrapper.find('svg').length); + }); +}); + +describe('CircularProgressbar props', () => { + it('strokeWidth', () => { + const wrapper = shallow( + + ); + assert.equal(2, wrapper.find('.CircularProgressbar-path').prop('strokeWidth')); + }); });