A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://enzymejs.github.io/enzyme/docs/api/ShallowWrapper/text.html below:

text() ยท Enzyme

.text() => String

Returns a string of the rendered text of the current render tree. This function should be looked at with skepticism if being used to test what the actual HTML output of the component will be. If that is what you would like to test, use enzyme's render function instead.

Note: can only be called on a wrapper of a single node.

Returns

String: The resulting string

Examples
const wrapper = shallow(<div><b>important</b></div>);
expect(wrapper.text()).to.equal('important');
const wrapper = shallow(<div><Foo /><b>important</b></div>);
expect(wrapper.text()).to.equal('<Foo />important');

.html() => String


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4