Skip to content

Commit

Permalink
Add areEqual test
Browse files Browse the repository at this point in the history
  • Loading branch information
mmarkelov committed May 7, 2019
1 parent 7d0b78b commit 236e43f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/Slider.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,19 @@ describe('Slider', () => {
).toBe(true);
});

test('areEqual return right result', () => {
const wrapper = mount(
<Nouislider
className="test"
range={{ min: 0, max: 100 }}
start={20}
connect
/>,
);
wrapper.setProps({ start: 80 });
expect(wrapper.render().html().includes('aria-valuenow="80.0"')).toBe(true);
});

test('disabled prop should passed correctly', () => {
const wrapper = mount(
<Nouislider range={{ min: 0, max: 100 }} start={[20, 80]} disabled />,
Expand Down

0 comments on commit 236e43f

Please sign in to comment.