mirror of
				https://github.com/reduxjs/redux-devtools.git
				synced 2025-10-31 16:07:45 +03:00 
			
		
		
		
	* chore(deps): update dependency prettier to v3 * Format --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Nathan Bierema <nbierema@gmail.com>
		
			
				
	
	
		
			35 lines
		
	
	
		
			840 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			840 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import React from 'react';
 | |
| import { render } from '@testing-library/react';
 | |
| import { Container } from '../src';
 | |
| 
 | |
| Object.defineProperty(window, 'matchMedia', {
 | |
|   writable: true,
 | |
|   value: jest.fn().mockImplementation((query) => ({
 | |
|     matches: false,
 | |
|     media: query,
 | |
|     onchange: null,
 | |
|     addListener: jest.fn(), // deprecated
 | |
|     removeListener: jest.fn(), // deprecated
 | |
|     addEventListener: jest.fn(),
 | |
|     removeEventListener: jest.fn(),
 | |
|     dispatchEvent: jest.fn(),
 | |
|   })),
 | |
| });
 | |
| 
 | |
| describe('Container', function () {
 | |
|   it('renders correctly', () => {
 | |
|     const { container } = render(
 | |
|       <Container
 | |
|         themeData={{
 | |
|           theme: 'default',
 | |
|           scheme: 'default',
 | |
|           colorPreference: 'auto',
 | |
|         }}
 | |
|       >
 | |
|         Text
 | |
|       </Container>,
 | |
|     );
 | |
|     expect(container.firstChild).toMatchSnapshot();
 | |
|   });
 | |
| });
 |