mirror of
https://github.com/grafana/grafana.git
synced 2024-11-24 09:50:29 -06:00
convert test to RTL (#48291)
This commit is contained in:
parent
7acf5bd7e8
commit
d774deab99
@ -50,9 +50,6 @@ exports[`no enzyme tests`] = {
|
||||
"packages/grafana-ui/src/components/Typeahead/Typeahead.test.tsx:972524250": [
|
||||
[0, 17, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/grafana-ui/src/components/Typeahead/TypeaheadInfo.test.tsx:3512289373": [
|
||||
[0, 17, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/grafana-ui/src/slate-plugins/braces.test.tsx:1440546721": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { mount } from 'enzyme';
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import React from 'react';
|
||||
|
||||
import { CompletionItem } from '../../types';
|
||||
@ -6,9 +6,9 @@ import { CompletionItem } from '../../types';
|
||||
import { TypeaheadInfo } from './TypeaheadInfo';
|
||||
|
||||
describe('TypeaheadInfo component', () => {
|
||||
it('should show documentation as rendered markdown if passed as a markdown', () => {
|
||||
const item: CompletionItem = { label: 'markdown', documentation: '**bold**' };
|
||||
const wrapper = mount(<TypeaheadInfo item={item} height={100} />);
|
||||
expect(wrapper.find('div>div').html()).toMatch('strong');
|
||||
it('should show documentation as rendered markdown if passed as markdown', () => {
|
||||
const item: CompletionItem = { label: 'markdown', documentation: '# My heading' };
|
||||
render(<TypeaheadInfo item={item} height={100} />);
|
||||
expect(screen.getByRole('heading', { name: 'My heading' })).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user