Skip to content

Commit aa83174

Browse files
committed
Replace .getAttribute(…)).toBe(…) with .toHaveAttribute(…, …)
1 parent b30137c commit aa83174

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/Calendar/Navigation.spec.jsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ describe('Navigation', () => {
2626
const [prev2, prev, drillUp, next, next2] = children;
2727

2828
expect(children).toHaveLength(5);
29-
expect(prev2.getAttribute('type')).toBe('button');
30-
expect(prev.getAttribute('type')).toBe('button');
31-
expect(drillUp.getAttribute('type')).toBe('button');
32-
expect(next.getAttribute('type')).toBe('button');
33-
expect(next2.getAttribute('type')).toBe('button');
29+
expect(prev2).toHaveAttribute('type', 'button');
30+
expect(prev).toHaveAttribute('type', 'button');
31+
expect(drillUp).toHaveAttribute('type', 'button');
32+
expect(next).toHaveAttribute('type', 'button');
33+
expect(next2).toHaveAttribute('type', 'button');
3434
});
3535

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

4343
expect(children).toHaveLength(3);
44-
expect(prev.getAttribute('type')).toBe('button');
45-
expect(drillUp.getAttribute('type')).toBe('button');
46-
expect(next.getAttribute('type')).toBe('button');
44+
expect(prev).toHaveAttribute('type', 'button');
45+
expect(drillUp).toHaveAttribute('type', 'button');
46+
expect(next).toHaveAttribute('type', 'button');
4747
});
4848

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

0 commit comments

Comments
 (0)