import React from 'react';
import renderer from 'react-test-renderer';
import { render, fireEvent } from '@testing-library/react';
import { LikeButton, LikeButtonProps } from './LikeButton';
import { FeedProvider } from '../context';
const testActivityData: LikeButtonProps['activity'] = {
id: '',
reaction_counts: {
like: 12,
},
own_reactions: {},
actor: '',
object: 'string',
verb: '',
foreign_id: '',
time: '',
};
const testReactionData: LikeButtonProps['reaction'] = {
activity_id: '',
user_id: '',
user: {
id: '',
created_at: '',
updated_at: '',
data: {
profileImage: '',
name: '',
},
},
data: {},
id: '',
kind: 'like',
created_at: '',
parent: '',
updated_at: '',
children_counts: {
like: 10,
},
latest_children: {},
};
describe('LikeButton', () => {
it('renders with required properties', () => {
const tree = renderer.create(
12 likes
10 likes