import { create } from 'react-test-renderer'; import Sticky from './Sticky'; test('Sticky renders', () => { const tree = create(Sticky).toJSON(); expect(tree).toMatchSnapshot(); }); test('Sticky correctly sets thresholds for number values', () => { const tree = create( Sticky , ).toJSON(); expect(tree).toMatchSnapshot(); }); test('Sticky correctly sets thresholds for string values', () => { const tree = create( Sticky , ).toJSON(); expect(tree).toMatchSnapshot(); }); test('Sticky correctly sets height', () => { const tree = create( Sticky , ).toJSON(); expect(tree).toMatchSnapshot(); }); test('Sticky correctly sets zIndex', () => { const zIndexStub = { index() { return 100; }, } as const; const tree = create( Sticky , ).toJSON(); expect(tree).toMatchSnapshot(); });