Skip to content

Commit a859e4b

Browse files
committed
Cleanup
1 parent d2b0eed commit a859e4b

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import dedent from 'dedent'
88
const js = dedent
99

1010
test('class regex works in astro', async ({ expect }) => {
11-
let { doc, state } = createDocument({
11+
let file = createDocument({
1212
name: 'file.astro',
1313
lang: 'astro',
1414
settings: {
@@ -29,7 +29,7 @@ test('class regex works in astro', async ({ expect }) => {
2929
],
3030
})
3131

32-
let classLists = await findClassListsInHtmlRange(state, doc, 'html')
32+
let classLists = await findClassListsInHtmlRange(file.state, file.doc, 'html')
3333

3434
expect(classLists).toEqual([
3535
{
@@ -169,7 +169,7 @@ test('find class lists in functions', async ({ expect }) => {
169169
})
170170

171171
test('find class lists in nested fn calls', async ({ expect }) => {
172-
let fileA = createDocument({
172+
let file = createDocument({
173173
name: 'file.jsx',
174174
lang: 'javascriptreact',
175175
settings: {
@@ -209,7 +209,7 @@ test('find class lists in nested fn calls', async ({ expect }) => {
209209
`,
210210
})
211211

212-
let classLists = await findClassListsInHtmlRange(fileA.state, fileA.doc, 'html')
212+
let classLists = await findClassListsInHtmlRange(file.state, file.doc, 'html')
213213

214214
expect(classLists).toMatchObject([
215215
{
@@ -285,7 +285,7 @@ test('find class lists in nested fn calls', async ({ expect }) => {
285285
})
286286

287287
test('find class lists in nested fn calls (only nested matches)', async ({ expect }) => {
288-
let fileA = createDocument({
288+
let file = createDocument({
289289
name: 'file.jsx',
290290
lang: 'javascriptreact',
291291
settings: {
@@ -311,7 +311,7 @@ test('find class lists in nested fn calls (only nested matches)', async ({ expec
311311
`,
312312
})
313313

314-
let classLists = await findClassListsInHtmlRange(fileA.state, fileA.doc, 'html')
314+
let classLists = await findClassListsInHtmlRange(file.state, file.doc, 'html')
315315

316316
expect(classLists).toMatchObject([
317317
{
@@ -474,7 +474,7 @@ test('classFunctions can be a regex', async ({ expect }) => {
474474
})
475475

476476
test('classFunctions regexes only match on function names', async ({ expect }) => {
477-
let fileA = createDocument({
477+
let file = createDocument({
478478
name: 'file.jsx',
479479
lang: 'javascriptreact',
480480
settings: {
@@ -489,9 +489,9 @@ test('classFunctions regexes only match on function names', async ({ expect }) =
489489
`,
490490
})
491491

492-
let classListsA = await findClassListsInHtmlRange(fileA.state, fileA.doc, 'js')
492+
let classLists = await findClassListsInHtmlRange(file.state, file.doc, 'js')
493493

494-
expect(classListsA).toEqual([])
494+
expect(classLists).toEqual([])
495495
})
496496

497497
test('Finds consecutive instances of a class function', async ({ expect }) => {
@@ -540,7 +540,7 @@ test('Finds consecutive instances of a class function', async ({ expect }) => {
540540
})
541541

542542
test('classFunctions & classProperties should not duplicate matches', async ({ expect }) => {
543-
let fileA = createDocument({
543+
let file = createDocument({
544544
name: 'file.jsx',
545545
lang: 'javascriptreact',
546546
settings: {
@@ -575,9 +575,9 @@ test('classFunctions & classProperties should not duplicate matches', async ({ e
575575
`,
576576
})
577577

578-
let classListsA = await findClassListsInHtmlRange(fileA.state, fileA.doc, 'js')
578+
let classLists = await findClassListsInHtmlRange(file.state, file.doc, 'js')
579579

580-
expect(classListsA).toEqual([
580+
expect(classLists).toEqual([
581581
{
582582
classList: 'relative flex',
583583
range: {

0 commit comments

Comments
 (0)