Skip to content

Commit

Permalink
fix: Updated test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
anjuca154 committed Dec 29, 2023
1 parent 3dacdaf commit 34d39d7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/tests/dotMatrix.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
import "@testing-library/jest-dom";

import { DotMatrixPropType } from "../dot-matrix/types";
import { getGradient, getStyles } from "../dot-matrix/utils/utils";
import { getGradient, getStyles, getUniqueDots } from "../dot-matrix/utils/utils";
import { useDotMatrix } from "../dot-matrix/custom-hooks/useDotMatrix";
import { Elements } from "../dot-matrix/constants";
import DotMatrix from "../dot-matrix";
Expand Down Expand Up @@ -152,7 +152,7 @@ test('returns expected output for valid input', () => {
const dataPoints = [
{ name: 'Point A', count: 10, color: 'red' },
{ name: 'Point B', count: 1, color: 'blue' },
{ name: 'Point B', count: 10, color: 'yellow' },
{ name: 'Point C', count: 10, color: 'yellow' },
];

const dimensions = {
Expand All @@ -161,5 +161,5 @@ test('returns expected output for valid input', () => {
};

const { result } = renderHook(() => useDotMatrix(dataPoints, dimensions));
expect(result.current).toHaveLength(1);
expect(getUniqueDots(result.current)).toHaveLength(3);
});

0 comments on commit 34d39d7

Please sign in to comment.