javascript - react test, how to test for unchecked state? -


i have test using simulate.click, tests input checked. how test when input unchecked?

    var input = testutils.findrendereddomcomponentwithtag(instance, "input");      testutils.simulate.click(input);      var data = this.stubbed.getlastpublished();      expect(data.topic === 'selected');     expect(data.id === 1);     expect(input.checked === true); 

thanks reply used:

testutils.simulate.click(input, { target: {         checked: false }     }); 

Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -