score:91

Accepted answer

you can use wrapper.debug() to get a string representing the wrapper element, like in:

import {shallow} from "enzyme";
const wrapper = shallow(<samplecomponent/>);
console.log(wrapper.debug());

score:9

import {shallow} from "enzyme";
const wrapper = shallow(<samplecomponent/>);
console.log(wrapper.html());

Related Query

More Query from same tag