import React from 'react';
import { render, cleanup } from '@testing-library/react';
import '@testing-library/jest-dom/extend-expect';
import { Gauge } from './';

const gaugeProps = {
	data: [
		{ color: '#FED57D', label: '0 - 33%' },
		{ color: '#883604', label: '33 - 67%' },
		{ color: '#FF8201', label: '67 - 100%' },
	],
	hideArrow: false,
	inverse: false,
	label: 'Gauge',
	max: 100,
	min: 0,
	segmentEnds: [33, 67],
	value: 100 / 3,
};

afterEach(cleanup);

test('should take a snapshot', () => {
	const { asFragment } = render(<Gauge {...gaugeProps} />);

	expect(asFragment()).toMatchSnapshot();
});
