Skip to content

Commit

Permalink
Remove corresponding test
Browse files Browse the repository at this point in the history
  • Loading branch information
bvandenbos committed May 3, 2017
1 parent 1d8f39f commit 7269d84
Showing 1 changed file with 4 additions and 21 deletions.
25 changes: 4 additions & 21 deletions test/slider-test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function skipWithoutDom() {
}

function testKeys(slider, tests) {
Object.keys(tests).forEach((key) => {
Object.keys(tests).forEach(key => {
const keyCode = KEYS[key];
const pos = tests[key];
assert(slider.getNextPositionForKey(0, keyCode) === pos, `${key}: ${pos}%`);
Expand Down Expand Up @@ -68,13 +68,7 @@ describe('<Slider />', () => {
render: pitRender,
});

mount(
<Slider
orientation="vertical"
pitComponent={PitComponent}
pitPoints={[10]}
/>,
);
mount(<Slider orientation="vertical" pitComponent={PitComponent} pitPoints={[10]} />);

assert.isTrue(pitRender.calledOnce, 'one pit was rendered vertically');
});
Expand All @@ -87,7 +81,7 @@ describe('<Slider />', () => {
assert.include(
slider.state('className'),
'rheostat-horizontal',
'cached class has horizontal',
'cached class has horizontal'
);

slider.setProps({ orientation: 'vertical' });
Expand All @@ -96,7 +90,7 @@ describe('<Slider />', () => {
assert.include(
slider.state('className'),
'rheostat-vertical',
'the cached classes were updated',
'the cached classes were updated'
);
});

Expand All @@ -112,17 +106,6 @@ describe('<Slider />', () => {
assert(onChange.callCount === 0, 'onChange was not called');
});

it('should not update values if we are sliding', () => {
const onChange = sinon.spy();
const slider = mount(<Slider onChange={onChange} values={[0]} />);

slider.setState({ slidingIndex: 0 });

slider.setProps({ values: [50] });

assert(onChange.callCount === 0, 'updateNewValues was not called');
});

it('should not update values if they are the same', () => {
const onChange = sinon.spy();
const slider = mount(<Slider onChange={onChange} values={[50]} />);
Expand Down

0 comments on commit 7269d84

Please sign in to comment.