Skip to content

Commit

Permalink
docs: update matchMedia methods (#8835)
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxim-Mazurok authored and SimenB committed Aug 16, 2019
1 parent 23b9860 commit e76c7da
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions docs/ManualMocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,11 @@ window.matchMedia = jest.fn().mockImplementation(query => {
matches: false,
media: query,
onchange: null,
addListener: jest.fn(),
removeListener: jest.fn(),
addListener: jest.fn(), // deprecated
removeListener: jest.fn(), // deprecated
addEventListener: jest.fn(),
removeEventListener: jest.fn(),
dispatchEvent: jest.fn(),
};
});
```
Expand Down
7 changes: 5 additions & 2 deletions website/versioned_docs/version-23.x/ManualMocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,11 @@ window.matchMedia = jest.fn().mockImplementation(query => {
matches: false,
media: query,
onchange: null,
addListener: jest.fn(),
removeListener: jest.fn(),
addListener: jest.fn(), // deprecated
removeListener: jest.fn(), // deprecated
addEventListener: jest.fn(),
removeEventListener: jest.fn(),
dispatchEvent: jest.fn(),
};
});
```
Expand Down

0 comments on commit e76c7da

Please sign in to comment.