universal-adaptive-bars 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "universal-adaptive-bars",
3
3
  "private": false,
4
- "version": "0.0.5",
4
+ "version": "0.0.6",
5
5
  "description": "A highly customizable smart bar chart for React and React Native",
6
6
  "author": "Sammed Doshi <Sammeddoshi03.sd@gmail.com>",
7
7
  "repository": {
@@ -1,5 +1,5 @@
1
1
  import { render, screen, fireEvent } from '@testing-library/react';
2
- import { describe, it, expect, vi } from 'vitest';
2
+ import { describe, it, expect } from 'vitest';
3
3
  import { SmartBarChart } from '../SmartBarChart';
4
4
 
5
5
  describe('SmartBarChart Navigation', () => {
@@ -14,7 +14,7 @@ describe('SmartBarChart Navigation', () => {
14
14
  });
15
15
 
16
16
  it('enables prev button when data exceeds visible count', () => {
17
- render(<SmartBarChart data={mockData} view="month" />); // VISIBLE_COUNT = 12
17
+ render(<SmartBarChart data={mockData} view="month" dataKeys={{ date: 'date', value: 'value', label: 'label' }} />); // VISIBLE_COUNT = 12
18
18
  // mockData has 24 items.
19
19
  // Initial window: last 12 items (indices 12-23).
20
20
  // Prev button should be enabled because we can go back to indices 0-11.
@@ -27,7 +27,7 @@ describe('SmartBarChart Navigation', () => {
27
27
  });
28
28
 
29
29
  it('updates window offset when prev button is clicked', () => {
30
- render(<SmartBarChart data={mockData} view="month" />);
30
+ render(<SmartBarChart data={mockData} view="month" dataKeys={{ date: 'date', value: 'value', label: 'label' }} />);
31
31
  const prevBtn = screen.getByText('<');
32
32
 
33
33
  fireEvent.click(prevBtn);