import React from 'react'; import { IntlProvider } from '@edx/frontend-platform/i18n'; import TestRenderer from 'react-test-renderer'; import { AppContext } from '@edx/frontend-platform/react'; import { StudioHeader } from './index'; describe('', () => { it('renders correctly', () => { const component = ( ); const wrapper = TestRenderer.create(component); expect(wrapper.toJSON()).toMatchSnapshot(); }); it('renders correctly with the optional app menu', () => { const appMenu = { content: 'App Menu', menuItems: [ { type: 'dropdown', href: 'https://menu-href-url.org', content: 'Content 1', }, { type: 'dropdown', href: 'https://menu-href-url.org', content: 'Content 2', }, { type: 'dropdown', href: 'https://menu-href-url.org', content: 'Content 3', }, ], }; const component = ( ); const wrapper = TestRenderer.create(component); expect(wrapper.toJSON()).toMatchSnapshot(); }); it('renders correctly with the optional main menu', () => { const mainMenu = [ { type: 'dropdown', href: 'https://menu-href-url.org', content: 'Content 1', }, { type: 'dropdown', href: 'https://menu-href-url.org', content: 'Content 2', }, { type: 'dropdown', href: 'https://menu-href-url.org', content: 'Content 3', }, ]; const component = ( ); const wrapper = TestRenderer.create(component); expect(wrapper.toJSON()).toMatchSnapshot(); }); });