diff --git a/.betterer.results b/.betterer.results index 32a9c19ec5a..979f8927b28 100644 --- a/.betterer.results +++ b/.betterer.results @@ -5,9 +5,6 @@ // exports[`no enzyme tests`] = { value: `{ - "packages/grafana-ui/src/components/BarGauge/BarGauge.test.tsx:4199795290": [ - [0, 19, 13, "RegExp match", "2409514259"] - ], "packages/grafana-ui/src/components/Forms/Legacy/Input/Input.test.tsx:3129955645": [ [0, 19, 13, "RegExp match", "2409514259"] ], diff --git a/packages/grafana-ui/src/components/BarGauge/BarGauge.test.tsx b/packages/grafana-ui/src/components/BarGauge/BarGauge.test.tsx index ecafd8ffeae..d34b27d943d 100644 --- a/packages/grafana-ui/src/components/BarGauge/BarGauge.test.tsx +++ b/packages/grafana-ui/src/components/BarGauge/BarGauge.test.tsx @@ -1,4 +1,4 @@ -import { shallow } from 'enzyme'; +import { render } from '@testing-library/react'; import React from 'react'; import { @@ -62,17 +62,6 @@ function getProps(propOverrides?: Partial): Props { return props; } -const setup = (propOverrides?: object) => { - const props = getProps(propOverrides); - const wrapper = shallow(); - const instance = wrapper.instance() as BarGauge; - - return { - instance, - wrapper, - }; -}; - function getValue(value: number, title?: string): DisplayValue { return { numeric: value, text: value.toString(), title: title }; } @@ -315,8 +304,8 @@ describe('BarGauge', () => { describe('Render with basic options', () => { it('should render', () => { - const { wrapper } = setup(); - expect(wrapper).toMatchSnapshot(); + const props = getProps(); + expect(() => render()).not.toThrow(); }); }); diff --git a/packages/grafana-ui/src/components/BarGauge/__snapshots__/BarGauge.test.tsx.snap b/packages/grafana-ui/src/components/BarGauge/__snapshots__/BarGauge.test.tsx.snap deleted file mode 100644 index 3907e77f271..00000000000 --- a/packages/grafana-ui/src/components/BarGauge/__snapshots__/BarGauge.test.tsx.snap +++ /dev/null @@ -1,81 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`BarGauge Render with basic options should render 1`] = ` -
-
- -
-
-
-
-`;