I\'m confused about how to access value when using mount. Here\'s what I\'ve got as my test:
it(\'cancels changes w
In my case i was using ref callbacks,
this._validateMail()}
ref={(val) =>{ this._username = val}}
>
To obtain the value. So enzyme will not change the value of this._username.
So i had to:
login.node._username.value = "mario@com.com";
user.simulate('change');
expect(login.state('mailValid')).toBe(true);
To be able to set the value then call change . And then assert.