text: import React from 'react';
  import { useAnchoredPosition } from '../../hooks/useAnchoredPosition';
  import { render } from '@testing-library/react';
  
  const Component = ({
    callback
  }) => {
    const floatingElementRef = React.useRef(null);
    const anchorElementRef = React.useRef(null);
    callback(useAnchoredPosition({
      floatingElementRef,
      anchorElementRef
    }));
    return /*#__PURE__*/React.createElement("div", {
      style: {
        position: 'absolute'
      }
    }, /*#__PURE__*/React.createElement("div", {
      style: {
        position: 'absolute',
        top: '20px',
        left: '20px',
        height: '50px',
        width: '50px'
      },
      ref: floatingElementRef
    }), /*#__PURE__*/React.createElement("div", {
      ref: anchorElementRef
    }));
  };
  
  Component.displayName = "Component";
  it('should should return a position', () => {
    const cb = jest.fn();
    render( /*#__PURE__*/React.createElement(Component, {
      callback: cb
    }));
    expect(cb).toHaveBeenCalledTimes(2);
    expect(cb.mock.calls[1][0]['position']).toMatchInlineSnapshot(`
  Object {
    "anchorSide": "outside-bottom",
    "left": 0,
    "top": 4,
  }
  `);
  });