import { fireEvent, render, screen } from '@testing-library/react'; import { Footer, NodeHealth } from './footer'; import { useEnvironment } from '@vegaprotocol/environment'; jest.mock('@vegaprotocol/environment'); describe('Footer', () => { it('can open node switcher by clicking the node url', () => { const mockOpenNodeSwitcher = jest.fn(); const node = 'n99.somenetwork.vega.xyz'; // @ts-ignore mock env hook useEnvironment.mockImplementation(() => ({ VEGA_URL: `https://api.${node}/graphql`, blockDifference: 0, setNodeSwitcherOpen: mockOpenNodeSwitcher, })); render(