Skip to content

Commit 8f0866e

Browse files
committed
feat: upgrade tests
1 parent 01ebbc8 commit 8f0866e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/strict-ts-conditionals.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ ruleTester.run('boolean-jsx-conditionals', rule as any, {
1717
const Component = ({check}: {check: boolean}) => (<div>{check && <p>Check</p>}</div>)
1818
`,
1919
`
20+
const Component = ({check}: {check: ()=>string}) => (<div>{!!check() && <p>Check</p>}</div>)
21+
`,
22+
`
23+
const Component = ({check}: {check: (arg)=>string}) => (<div>{!!check('arg') && <p>Check</p>}</div>)
24+
`,
25+
`
26+
const Component = ({check}: {check: (arg)=>string}) => (<div>{!!(check('arg')) && <p>Check</p>}</div>)
27+
`,
28+
`
2029
const Component = ({check}: {check: string}) => (<div>{check.length ? <p>Check</p>: <p>Check</p>}</div>)
2130
`,
2231
`

0 commit comments

Comments
 (0)