forked from StellarSplit/StellarSplit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSplitHeader.test.tsx
More file actions
27 lines (24 loc) · 814 Bytes
/
Copy pathSplitHeader.test.tsx
File metadata and controls
27 lines (24 loc) · 814 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { render, screen } from '@testing-library/react';
import { describe, it, expect } from 'vitest';
import { SplitHeader } from './SplitHeader';
import type { Split } from '../../types';
const mockSplit: Split = {
id: '1',
title: 'Test Split',
totalAmount: 100,
currency: 'USD',
date: new Date().toISOString(),
status: 'active',
participants: []
};
describe('SplitHeader', () => {
it('renders the split title and amount', () => {
render(<SplitHeader split={mockSplit} />);
expect(screen.getByText('Test Split')).toBeDefined();
expect(screen.getByText('$100.00')).toBeDefined();
});
it('shows active status badge', () => {
render(<SplitHeader split={mockSplit} />);
expect(screen.getByText('Active')).toBeDefined();
});
});