Skip to content

Commit e3a3c5d

Browse files
committed
Add failing test for Button onClick handlers
1 parent f900373 commit e3a3c5d

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
@@ -265,6 +265,14 @@ describe('packages/button', () => {
265265
<Button onClick={() => {}} />;
266266
});
267267

268+
test('infers the onClick handler argument', () => {
269+
<Button
270+
onClick={event => {
271+
event.preventDefault();
272+
}}
273+
/>;
274+
});
275+
268276
test('accepts anchor tag attributes', () => {
269277
<Button href="http://mongodb.design" target="_blank" rel="noopener" />;
270278
});

0 commit comments

Comments
 (0)