Skip to content

Commit

Permalink
Add unmount test
Browse files Browse the repository at this point in the history
  • Loading branch information
mmarkelov committed May 8, 2019
1 parent 27d0c1f commit 9dfc05f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/Slider.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,17 @@ describe('Slider', () => {
expect(wrapper.prop('disabled')).toBe(true);
});

test('unmount correctly', () => {
const wrapper = mount(
<Nouislider range={{ min: 0, max: 100 }} start={[20, 80]} disabled />,
);
wrapper.unmount();
const wrapper2 = mount(
<Nouislider range={{ min: 0, max: 10 }} start={5} id="unmount" />,
);
expect(wrapper2.html().includes('id="unmount"')).toBe(true);
});

describe('areEqual', () => {
test('return right result for start', () => {
const wrapper = mount(
Expand Down

0 comments on commit 9dfc05f

Please sign in to comment.