Issue title: TypeError: win.matchmedia is not a function
 Issue body: <!--



-->

- `@testing-library/react` version: 13.2.0 (also tried 13.1.1 - same error)
- Testing Framework and version:
  React Scripts version 5.0.1 using Jest 27.5.1
- DOM Environment:
@testing-library/jest-dom version 5.16.4

### Relevant code or config:

```js
const customRender = (ui: React.ReactElement, options?: RenderOptions) =>
  render(ui, { wrapper: AllProviders, ...options });
```

### What you did:
Updated to react-scripts 5.0.1 and React 18. 

<!-- What you were doing -->
Ran the tests with `npm test`

### What happened:
Got this error:
`TypeError: win.matchMedia is not a function`

### Problem description:

Tests calling render won't run.


 Comments: 
 Comment 0: This looks like an issue with your testing environment. I suggest finding out where this error originates first and then find how who should provide that value. Testing Library is not responsible for polyfilling browser features like `matchMedia`.
{'source': 'GithubIssues', 'repo_name_with_owner': 'testing-library/react-testing-library', 'issue_id': 1239597795, 'repo_stars': 10780.0}