Skip to content

Commit a42e5b8

Browse files
committed
Add failing test for Button onClick handlers
1 parent 4412ce1 commit a42e5b8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/button/src/Button/Button.spec.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,14 @@ describe('packages/button', () => {
261261
<Button onClick={() => {}} />;
262262
});
263263

264+
test('infers the onClick handler argument', () => {
265+
<Button
266+
onClick={event => {
267+
event.preventDefault();
268+
}}
269+
/>;
270+
});
271+
264272
test('accepts anchor tag attributes', () => {
265273
<Button href="http://mongodb.design" target="_blank" rel="noopener" />;
266274
});

0 commit comments

Comments
 (0)