MCPcopy
hub / github.com/facebook/react / assertCalls

Function assertCalls

packages/react/src/__tests__/ReactChildren-test.js:140–147  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

138 );
139
140 function assertCalls() {
141 expect(callback).toHaveBeenCalledWith(zero, 0);
142 expect(callback).toHaveBeenCalledWith(one, 1);
143 expect(callback).toHaveBeenCalledWith(two, 2);
144 expect(callback).toHaveBeenCalledWith(three, 3);
145 expect(callback).toHaveBeenCalledWith(four, 4);
146 callback.mockClear();
147 }
148
149 React.Children.forEach(instance.props.children, callback, context);
150 assertCalls();

Callers 1

Calls 2

toHaveBeenCalledWithMethod · 0.80
mockClearMethod · 0.80

Tested by

no test coverage detected