mirror of
https://github.com/datahub-project/datahub.git
synced 2025-07-27 03:19:51 +00:00
19 lines
635 B
TypeScript
19 lines
635 B
TypeScript
![]() |
// jest-dom adds custom jest matchers for asserting on DOM nodes.
|
||
|
// allows you to do things like:
|
||
|
// expect(element).toHaveTextContent(/react/i)
|
||
|
// learn more: https://github.com/testing-library/jest-dom
|
||
|
import '@testing-library/jest-dom';
|
||
|
|
||
|
// Mock window.matchMedia interface.
|
||
|
// See https://jestjs.io/docs/en/manual-mocks#mocking-methods-which-are-not-implemented-in-jsdom
|
||
|
// and https://github.com/ant-design/ant-design/issues/21096.
|
||
|
global.matchMedia =
|
||
|
global.matchMedia ||
|
||
|
(() => {
|
||
|
return {
|
||
|
matches: false,
|
||
|
addListener: jest.fn(),
|
||
|
removeListener: jest.fn(),
|
||
|
};
|
||
|
});
|