Skip to content

Commit 05f5e07

Browse files
bolivierlayershifter
authored andcommitted
Add more forwardsRef tests
1 parent 9e1c31c commit 05f5e07

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

test/specs/collections/Form/FormField-test.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,5 +249,24 @@ describe('FormField', () => {
249249

250250
describe.only('forwards ref', () => {
251251
common.forwardsRef(FormField)
252+
common.forwardsRef(FormField, {
253+
tagName: 'input',
254+
requiredProps: { control: 'input' },
255+
})
256+
common.forwardsRef(FormField, {
257+
tagName: 'input',
258+
requiredProps: { control: 'input', type: 'radio' },
259+
})
260+
common.forwardsRef(FormField, {
261+
tagName: 'input',
262+
requiredProps: { control: 'input', type: 'checkbox' },
263+
})
264+
265+
common.forwardsRef(FormField, {
266+
tagName: 'div',
267+
requiredProps: {
268+
children: <input />,
269+
},
270+
})
252271
})
253272
})

0 commit comments

Comments
 (0)