本文整理匯總了TypeScript中react-dom/test-utils.scryRenderedDOMComponentsWithClass函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript scryRenderedDOMComponentsWithClass函數的具體用法?TypeScript scryRenderedDOMComponentsWithClass怎麽用?TypeScript scryRenderedDOMComponentsWithClass使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了scryRenderedDOMComponentsWithClass函數的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: setTimeout
setTimeout(() => {
const diffs = ReactTestUtils.scryRenderedDOMComponentsWithClass(
sidebarListWrapper,
'record-diff'
)
expect(diffs).to.have.length(0)
done()
}, DIFF_STATE_DURATION)
示例2: it
it('should not add class record-diff to any record given shouldTagDiffs is false', () => {
sidebarListWrapper.setState({
records: [].concat(_records, actions[3].record),
shouldTagDiffs: false
})
const diffs = ReactTestUtils.scryRenderedDOMComponentsWithClass(
sidebarListWrapper,
'record-diff'
)
expect(diffs).to.have.length(0)
})
示例3: it
it('scryRenderedDOMComponentsWithClass', () => {
const component = ReactTestUtils.renderIntoDocument(React.createElement(TestComponent));
ReactTestUtils.scryRenderedDOMComponentsWithClass(component, 'class');
});