You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.
We' moved all the no presentational logics out of our components and just left them with presentational behaviours.
So, preferred is to look at the component as a black box that we won’t penetrate to test. we’ll check its behaviour from outside. so this makes it a unit test in which unit resembles a component as a whole.
an example of such a test is:
it('should allow to change passphrase field to type="text"', () => {
expect(wrapper.find('.passphrase input').props().type).to.equal('password');
wrapper.setState({ showPassphrase: true });
expect(wrapper.find('.passphrase input').props().type).to.equal('text');
});
Actual behaviour
in some cases we test componentDidMount or other specific method directly using notations like: wrapper.instance().validateUrl
Steps to reproduce
This, this and this are some samples of this kind of tests.
The text was updated successfully, but these errors were encountered:
Expected behaviour
We' moved all the no presentational logics out of our components and just left them with presentational behaviours.
So, preferred is to look at the component as a black box that we won’t penetrate to test. we’ll check its behaviour from outside. so this makes it a unit test in which unit resembles a component as a whole.
an example of such a test is:
Actual behaviour
in some cases we test
componentDidMount
or other specific method directly using notations like:wrapper.instance().validateUrl
Steps to reproduce
This, this and this are some samples of this kind of tests.
The text was updated successfully, but these errors were encountered: