score:1

You can use .find(Jumbotron) and use that for matching as snapshot, for example:

const wrapped = component.find(Jumbotron);
expect(toJson(wrapped)).toMatchSnapshot();

I had a more complex example involving withRouter() and I was restoring to removing all keys from the output before matching as snapshot. Well, until testing for React-Router v4 gets more solid with Jest and snapshot testing. Example:

export function removeKeys(object) {
    if (object === undefined || object === null) {
        return object;
    }
    Object.keys(object).forEach((key) => {
        if (typeof object[key] === 'object') {
            removeKeys(object[key]);
        } else if (key === 'key') {
           delete object[key];
        }
    });
    return object;
}

...

expect(removeKeys(toJson(component))).toMatchSnapshot();

Related Query

More Query from same tag