/// /// import * as fc from 'fast-check' import * as Enzyme from 'enzyme' import * as Axe from 'jest-axe' import * as React from 'react' import Button, { Variant, ButtonElement } from './Button' import stringify from '../../services/stringify' const CUSTOM_VARIANTS: string[] = ['primary'] const AVAILABLE_VARIANTS: string[] = ['outline', 'primary'] it('should exist', () => { expect(Button).toBeDefined() }) it('should be a component', () => { expect(Button).toBeComponent() }) it('should render without crashing given minimum required props', () => { expect(() => ) expect(wrapper).toHaveText(stringify(label)) }), { numRuns: 300, }, ) }) describe('on disabled', () => { it('should render a disabled button element for button kind', () => { const wrapper = Enzyme.shallow() const results = await Axe.axe(wrapper.getDOMNode()) expect(results).toHaveNoViolations() }), ) })