Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
brendan-defi committed Dec 15, 2024
1 parent be2fb69 commit 817e871
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/internal/components/QrCode/gradientConstants.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ describe('Preset Gradients', () => {
const expectedPresets = ['default', 'blue', 'magenta', 'black'];

for (const preset of expectedPresets) {
expect(presetGradients[preset]).toBeDefined();
expect(Array.isArray(presetGradients[preset])).toBe(true);
expect(presetGradients[preset].length).toBe(3);
expect(presetGradients[preset as keyof typeof presetGradients]).toBeDefined();
expect(Array.isArray(presetGradients[preset as keyof typeof presetGradients])).toBe(true);
expect(presetGradients[preset as keyof typeof presetGradients].length).toBe(3);
}
});

Expand Down
4 changes: 2 additions & 2 deletions src/internal/components/QrCode/useCorners.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ describe('useCorners', () => {
const children = svgGroup.props.children;
expect(children).toHaveLength(6);

const rects = children.filter((child) => child.type === 'rect');
const rects = children.filter((child: JSX.Element) => child.type === 'rect');
expect(rects).toHaveLength(3);

const circles = children.filter((child) => child.type === 'circle');
const circles = children.filter((child: JSX.Element) => child.type === 'circle');
expect(circles).toHaveLength(3);
});

Expand Down

0 comments on commit 817e871

Please sign in to comment.