| b69ab31 | | | 1 | /** |
| b69ab31 | | | 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. |
| b69ab31 | | | 3 | * |
| b69ab31 | | | 4 | * This source code is licensed under the MIT license found in the |
| b69ab31 | | | 5 | * LICENSE file in the root directory of this source tree. |
| b69ab31 | | | 6 | */ |
| b69ab31 | | | 7 | |
| b69ab31 | | | 8 | // jest-dom adds custom jest matchers for asserting on DOM nodes. |
| b69ab31 | | | 9 | // allows you to do things like: |
| b69ab31 | | | 10 | // expect(element).toHaveTextContent(/react/i) |
| b69ab31 | | | 11 | // learn more: https://github.com/testing-library/jest-dom |
| b69ab31 | | | 12 | import '@testing-library/jest-dom'; |
| b69ab31 | | | 13 | |
| b69ab31 | | | 14 | // jest doesn't have the stylex compilation step, let's just mock it |
| b69ab31 | | | 15 | jest.mock('@stylexjs/stylex', () => { |
| b69ab31 | | | 16 | return { |
| b69ab31 | | | 17 | defineVars(_: unknown) { |
| b69ab31 | | | 18 | return {}; |
| b69ab31 | | | 19 | }, |
| b69ab31 | | | 20 | createTheme(_: unknown, __: unknown) { |
| b69ab31 | | | 21 | return {}; |
| b69ab31 | | | 22 | }, |
| b69ab31 | | | 23 | props(..._: Array<unknown>) { |
| b69ab31 | | | 24 | return {}; |
| b69ab31 | | | 25 | }, |
| b69ab31 | | | 26 | create(o: unknown) { |
| b69ab31 | | | 27 | return o; |
| b69ab31 | | | 28 | }, |
| b69ab31 | | | 29 | }; |
| b69ab31 | | | 30 | }); |
| b69ab31 | | | 31 | |
| b69ab31 | | | 32 | import resizeObserver from 'resize-observer-polyfill'; |
| b69ab31 | | | 33 | window.ResizeObserver = resizeObserver; |