Enzyme Integration Testing Testing With React Router - Testing Components Update With Links
I would like to test that clicking on a link updates the components in my app. Here's my app, when you click on about it renders the About component import React, { Component } fr
Solution 1:
Link's render function will check for event.button === 0
. That's why check fails with enzyme if you call simulate
without proper params.
Try link.simulate('click', { button: 0 });
Good luck.
Post a Comment for "Enzyme Integration Testing Testing With React Router - Testing Components Update With Links"