Skip to content

Commit 077a7d2

Browse files
committed
[Tests] default-props-match-prop-types: add passing test
Closes #1554
1 parent 2cac2e8 commit 077a7d2

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/lib/rules/default-props-match-prop-types.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -778,6 +778,26 @@ ruleTester.run('default-props-match-prop-types', rule, {
778778
`,
779779
features: ['types'],
780780
},
781+
{
782+
code: `
783+
import type { FieldProps } from 'redux-form';
784+
785+
type Props = FieldProps & {
786+
name: string,
787+
type: string,
788+
label?: string,
789+
placeholder?: string,
790+
disabled?: boolean,
791+
};
792+
793+
TextField.defaultProps = {
794+
label: '',
795+
placeholder: '',
796+
disabled: false,
797+
};
798+
`,
799+
features: ['types'],
800+
},
781801
]),
782802

783803
invalid: parsers.all([

0 commit comments

Comments
 (0)