mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
mockImpl -> mockImplementation
D4329549
This commit is contained in:
@@ -502,11 +502,11 @@ describe('ReactDOMComponent', () => {
|
||||
var node = container.firstChild;
|
||||
var nodeSetAttribute = node.setAttribute;
|
||||
node.setAttribute = jest.fn();
|
||||
node.setAttribute.mockImpl(nodeSetAttribute);
|
||||
node.setAttribute.mockImplementation(nodeSetAttribute);
|
||||
|
||||
var nodeRemoveAttribute = node.removeAttribute;
|
||||
node.removeAttribute = jest.fn();
|
||||
node.removeAttribute.mockImpl(nodeRemoveAttribute);
|
||||
node.removeAttribute.mockImplementation(nodeRemoveAttribute);
|
||||
|
||||
ReactDOM.render(<div id="" />, container);
|
||||
expect(node.setAttribute.mock.calls.length).toBe(0);
|
||||
|
||||
@@ -571,7 +571,7 @@ describe('ReactTestUtils', () => {
|
||||
describe('Simulate', () => {
|
||||
it('should set the type of the event', () => {
|
||||
let event;
|
||||
const stub = jest.genMockFn().mockImpl((e) => {
|
||||
const stub = jest.genMockFn().mockImplementation((e) => {
|
||||
e.persist();
|
||||
event = e;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user