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