Closed ThanhPhat1080 closed 5 years ago
I resolved it by using rerender
method right way. I don't need to pass variable to the rerender
, just only call it.
...
const button = container.querySelector('button.btn');
fireEvent.click(button);
rerender();
expect(button.className).toEqual('btn dark'); // pass
Thanks.
How can I get the updated value from context. In my case, I have a button, when I click on button, the data-context is update then UI update too, I don't know how to get the updated data-context and checking is UI update success or not.
Here is my code get from example