mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Fix reactComponentExpect.toBeDOMComponentWithChildCount(0) regression (#8271)
This should fix https://github.com/facebook/react/commit/3e2680411efa3b478afc1f26057f417c7aae7915#commitcomment-19788988.
This commit is contained in:
committed by
Sebastian Markbåge
parent
4804518c26
commit
b9f65d9b1d
@@ -157,8 +157,8 @@ Object.assign(reactComponentExpectInternal.prototype, {
|
||||
if (count > 0) {
|
||||
expect(renderedChildren).toBeTruthy();
|
||||
expect(Object.keys(renderedChildren).length).toBe(count);
|
||||
} else {
|
||||
expect(renderedChildren).toBeFalsy();
|
||||
} else if (renderedChildren) {
|
||||
expect(Object.keys(renderedChildren).length).toBe(0);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
|
||||
Reference in New Issue
Block a user