We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 59f66ac commit 9ff1c04Copy full SHA for 9ff1c04
client/common/Button.test.tsx
@@ -1,5 +1,4 @@
1
import React from 'react';
2
-import { BrowserRouter } from 'react-router-dom';
3
import { render, screen, fireEvent } from '../test-utils';
4
import Button from './Button';
5
@@ -23,10 +22,11 @@ describe('Button', () => {
23
22
expect(link).toHaveAttribute('href', '/dashboard');
24
});
25
26
- it('renders as a <button> by default', () => {
+ it('renders as a <button> with a type of "button" by default', () => {
27
render(<Button>Click Me</Button>);
28
const el = screen.getByRole('button');
29
expect(el.tagName.toLowerCase()).toBe('button');
+ expect(el).toHaveAttribute('type', 'button');
30
31
32
// Children & Icons
0 commit comments