diff --git a/packages/app-utils/src/components/AppBootstrap.test.tsx b/packages/app-utils/src/components/AppBootstrap.test.tsx index 84a474a42d..dc838d24b7 100644 --- a/packages/app-utils/src/components/AppBootstrap.test.tsx +++ b/packages/app-utils/src/components/AppBootstrap.test.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useContext } from 'react'; import { AUTH_HANDLER_TYPE_ANONYMOUS } from '@deephaven/auth-plugins'; import { ApiContext } from '@deephaven/jsapi-bootstrap'; import { BROADCAST_LOGIN_MESSAGE } from '@deephaven/jsapi-utils'; @@ -10,6 +10,18 @@ import type { import { TestUtils } from '@deephaven/utils'; import { act, render, screen } from '@testing-library/react'; import AppBootstrap from './AppBootstrap'; +import { PluginsContext } from './PluginsBootstrap'; +import { PluginModuleMap } from '../plugins'; + +const { asMock } = TestUtils; + +jest.mock('react', () => { + const actual = jest.requireActual('react'); + return { + ...actual, + useContext: jest.fn(actual.useContext), + }; +}); const API_URL = 'http://mockserver.net:8111'; const PLUGINS_URL = 'http://mockserver.net:8111/plugins'; @@ -33,6 +45,7 @@ jest.mock('@deephaven/jsapi-components', () => ({ const mockChildText = 'Mock Child'; const mockChild =