diff --git a/packages/tailwindcss-language-service/src/util/find.test.ts b/packages/tailwindcss-language-service/src/util/find.test.ts index 170217c0..9c65f23d 100644 --- a/packages/tailwindcss-language-service/src/util/find.test.ts +++ b/packages/tailwindcss-language-service/src/util/find.test.ts @@ -1,6 +1,16 @@ import { test } from 'vitest' -import { findClassListsInHtmlRange, findClassNameAtPosition } from './find' -import { js, html, pug, createDocument } from './test-utils' +import { + findClassListsInHtmlRange, + findClassNameAtPosition, + findHelperFunctionsInDocument, +} from './find' +import { js, html, pug, createDocument, css } from './test-utils' +import type { Range } from 'vscode-languageserver-textdocument' + +const range = (startLine: number, startCol: number, endLine: number, endCol: number): Range => ({ + start: { line: startLine, character: startCol }, + end: { line: endLine, character: endCol }, +}) test('class regex works in astro', async ({ expect }) => { let file = createDocument({ @@ -875,3 +885,162 @@ test('Can find class name inside JS/TS functions in