logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

avatar_overlay-test.js (774B)


  1. import React from 'react';
  2. import renderer from 'react-test-renderer';
  3. import { fromJS } from 'immutable';
  4. import AvatarOverlay from '../avatar_overlay';
  5. describe('<AvatarOverlay', () => {
  6. const account = fromJS({
  7. username: 'alice',
  8. acct: 'alice',
  9. display_name: 'Alice',
  10. avatar: '/animated/alice.gif',
  11. avatar_static: '/static/alice.jpg',
  12. });
  13. const friend = fromJS({
  14. username: 'eve',
  15. acct: 'eve@blackhat.lair',
  16. display_name: 'Evelyn',
  17. avatar: '/animated/eve.gif',
  18. avatar_static: '/static/eve.jpg',
  19. });
  20. it('renders a overlay avatar', () => {
  21. const component = renderer.create(<AvatarOverlay account={account} friend={friend} />);
  22. const tree = component.toJSON();
  23. expect(tree).toMatchSnapshot();
  24. });
  25. });