// eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-nocheck import React from 'react' import renderer from 'react-test-renderer' import Expander, { ExpanderProps } from '../index' describe('Expander Snapshot', () => { describe('component rendered on server', () => { it('default render', () => { const props: ExpanderProps = { id: 'test-id', } const tree = renderer .create(
Children 1
Children 2
) .toJSON() expect(tree).toMatchSnapshot() }) it('only on mobile', () => { const props: ExpanderProps = { id: 'test-id', onlyMobile: true, } const tree = renderer .create(
Children 1
Children 2
) .toJSON() expect(tree).toMatchSnapshot() }) it('with different labels', () => { const props: ExpanderProps = { id: 'test-id', collapseLabel: 'Close', expandLabel: 'Open', } const tree = renderer .create(
Children 1
Children 2
) .toJSON() expect(tree).toMatchSnapshot() }) it('with different state', () => { const props: ExpanderProps = { id: 'test-id', state: 'expanded', } const tree = renderer .create(
Children 1
Children 2
) .toJSON() expect(tree).toMatchSnapshot() }) }) })