Skip to content

Commit f048e51

Browse files
author
Laurynas Grigutis
committed
feat: ensure same matches in a different spot are pushed to results in find.test.ts
1 parent 0977df1 commit f048e51

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

packages/tailwindcss-language-service/src/util/find.test.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,17 @@ test('classFunctions & classProperties should not duplicate matches', async ({ e
515515
CONTENT
516516
</div>
517517
)
518+
const OtherComponent = ({ className }) => (
519+
<div
520+
className={clsx(
521+
'relative flex',
522+
'inset-0 md:h-[calc(100%-2rem)]',
523+
clsx('rounded-none bg-blue-700', className),
524+
)}
525+
>
526+
CONTENT
527+
</div>
528+
)
518529
`,
519530
})
520531

@@ -542,6 +553,27 @@ test('classFunctions & classProperties should not duplicate matches', async ({ e
542553
end: { line: 5, character: 36 },
543554
},
544555
},
556+
{
557+
classList: 'relative flex',
558+
range: {
559+
start: { line: 14, character: 7 },
560+
end: { line: 14, character: 20 },
561+
},
562+
},
563+
{
564+
classList: 'inset-0 md:h-[calc(100%-2rem)]',
565+
range: {
566+
start: { line: 15, character: 7 },
567+
end: { line: 15, character: 37 },
568+
},
569+
},
570+
{
571+
classList: 'rounded-none bg-blue-700',
572+
range: {
573+
start: { line: 16, character: 12 },
574+
end: { line: 16, character: 36 },
575+
},
576+
},
545577
])
546578
})
547579

0 commit comments

Comments
 (0)