Skip to content

Commit

Permalink
Replace .getAttribute(…)).toBe(…) with .toHaveAttribute(…, …)
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmaj committed Mar 24, 2023
1 parent b30137c commit aa83174
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/Calendar/Navigation.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ describe('Navigation', () => {
const [prev2, prev, drillUp, next, next2] = children;

expect(children).toHaveLength(5);
expect(prev2.getAttribute('type')).toBe('button');
expect(prev.getAttribute('type')).toBe('button');
expect(drillUp.getAttribute('type')).toBe('button');
expect(next.getAttribute('type')).toBe('button');
expect(next2.getAttribute('type')).toBe('button');
expect(prev2).toHaveAttribute('type', 'button');
expect(prev).toHaveAttribute('type', 'button');
expect(drillUp).toHaveAttribute('type', 'button');
expect(next).toHaveAttribute('type', 'button');
expect(next2).toHaveAttribute('type', 'button');
});

it('renders prev, drill up, next and buttons only for century view', () => {
Expand All @@ -41,9 +41,9 @@ describe('Navigation', () => {
const [prev, drillUp, next] = children;

expect(children).toHaveLength(3);
expect(prev.getAttribute('type')).toBe('button');
expect(drillUp.getAttribute('type')).toBe('button');
expect(next.getAttribute('type')).toBe('button');
expect(prev).toHaveAttribute('type', 'button');
expect(drillUp).toHaveAttribute('type', 'button');
expect(next).toHaveAttribute('type', 'button');
});

it('displays proper title for month view', () => {
Expand Down

0 comments on commit aa83174

Please sign in to comment.