diff --git a/src/components/CommitFrequencyChart.test.tsx b/src/components/CommitFrequencyChart.test.tsx index 28f4838..b065250 100644 --- a/src/components/CommitFrequencyChart.test.tsx +++ b/src/components/CommitFrequencyChart.test.tsx @@ -18,12 +18,12 @@ describe('CommitFrequencyChart Component 📊', () => { expect(screen.getByText('Loading...')).toBeInTheDocument() }) - it('⏳ displays loading state when commitData is null', () => { + it('📈 skips rendering the chart if commitData is null', () => { render() expect(screen.getByText('Loading...')).toBeInTheDocument() }) - it('📈 displays the chart when commitData is provided', () => { + it('✅ renders the chart when valid commitData is provided', () => { const mockData = { labels: ['January', 'February'], datasets: [ @@ -39,8 +39,6 @@ describe('CommitFrequencyChart Component 📊', () => { render() - // Since we can't assert the actual rendering of the chart, - // we check for a canvas element generated by the Chart.js library. - expect(screen.getByRole('img')).toBeInTheDocument() + expect(screen.getByText('Commit Frequency')).toBeInTheDocument() }) })