Skip to content

Commit

Permalink
add a unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Oct 10, 2018
1 parent f65754e commit f217ce5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/material-ui/src/Stepper/Stepper.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,4 +199,17 @@ describe('<Stepper />', () => {
);
assert.strictEqual(wrapper.find(Step).length, 1);
});

it('should be able to force a state', () => {
const wrapper = shallow(
<Stepper>
<Step className="child-0" />
<Step className="child-1" active />
<Step className="child-2" />
</Stepper>,
);
assert.strictEqual(wrapper.find('.child-0').props().active, true);
assert.strictEqual(wrapper.find('.child-1').props().active, true);
assert.strictEqual(wrapper.find('.child-2').props().active, false);
});
});

0 comments on commit f217ce5

Please sign in to comment.