Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add failing test
  • Loading branch information
thecrypticace committed May 9, 2025
commit 8a4a60d9fc8af71a7c7205ef839def1b6d69d51a
22 changes: 22 additions & 0 deletions packages/tailwindcss/src/intellisense.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -653,3 +653,25 @@ test('shadow utility default suggestions', async () => {
expect(classNames).toContain('inset-shadow')
expect(classNames).toContain('text-shadow')
})

test('Custom @utility and existing utility with names matching theme keys dont give duplicate results', async () => {
let input = css`
@theme reference {
--leading-sm: 0.25rem;
--text-header: 1.5rem;
}

@utility text-header {
text-transform: uppercase;
}
`

let design = await __unstable__loadDesignSystem(input)

let classList = design.getClassList()
let classMap = new Map(classList)
let matches = classList.filter(([className]) => className === 'text-header')

expect(matches).toHaveLength(1)
expect(classMap.get('text-header')?.modifiers).toEqual(['sm'])
})