vega-frontend-monorepo/libs/ui-toolkit/src/components/thumbs/thumbs.spec.tsx
Sam Keen 068381d620
Feat/1512: equity like share vote (#1848)
* Feat/1512: Proposal type as enum, hoisted proposal type and min voting balance

* Feat/1512: Setup and new LP tally for update market proposals

* Feat/1512: Added LP data (if update market) to proposal-votes-table.tsx

* Feat/1512: Fixing some broken tests and added unit tests for proposal-votes-table

* Feat/1512: Tests for use-vote-information hook

* Feat/1512: Tests for use-network-params hook

* Feat/1512: Fixed some regenerated types

* Feat/1512: Addressed comments from PR

* Feat/1512: Condensed all useMemos in use-vote-information into a single one

* Feat/1512: Small tweak to Thumbs element
2022-10-26 13:44:10 +01:00

20 lines
523 B
TypeScript

import { render, screen } from '@testing-library/react';
import { Thumbs } from './thumbs';
describe('Thumbs', () => {
it('renders up', () => {
render(<Thumbs up={true} />);
expect(screen.getByText('👍')).toBeInTheDocument();
});
it('renders down', () => {
render(<Thumbs up={false} />);
expect(screen.getByText('👎')).toBeInTheDocument();
});
it('renders text', () => {
render(<Thumbs up={true} text="test" />);
expect(screen.getByText('👍 test')).toBeInTheDocument();
});
});