Skip to content

Commit 9ff1c04

Browse files
committed
cleanup test
1 parent 59f66ac commit 9ff1c04

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

client/common/Button.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React from 'react';
2-
import { BrowserRouter } from 'react-router-dom';
32
import { render, screen, fireEvent } from '../test-utils';
43
import Button from './Button';
54

@@ -23,10 +22,11 @@ describe('Button', () => {
2322
expect(link).toHaveAttribute('href', '/dashboard');
2423
});
2524

26-
it('renders as a <button> by default', () => {
25+
it('renders as a <button> with a type of "button" by default', () => {
2726
render(<Button>Click Me</Button>);
2827
const el = screen.getByRole('button');
2928
expect(el.tagName.toLowerCase()).toBe('button');
29+
expect(el).toHaveAttribute('type', 'button');
3030
});
3131

3232
// Children & Icons

0 commit comments

Comments
 (0)