/** * @jest-environment jsdom */ import { render, screen } from '@testing-library/react'; import DocService from 'calypso/devdocs/service'; import SingleDocClass from '../doc'; jest.mock( 'calypso/devdocs/service', () => ( { fetch: jest.fn(), } ) ); const defaultProps = { term: 'hello', path: '/example', sectionId: '', }; describe( 'SingleDoc', () => { describe( 'render test', () => { test( 'should render html with marked text', () => { const text = 'something hello'; DocService.fetch.mockImplementationOnce( ( path, cb ) => cb( null, `
${ text }