Home

tailwind-ctp-intellisense @master - refs - log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Tailwind intellisense + Catppuccin
tree log patch
Increase v2 test timeout
Brad Cornes <hello@bradley.dev>
1 year ago
1 changed files, 23 additions(+), 19 deletions(-)
M packages/tailwindcss-language-server/tests/code-actions/code-actions.v2.test.js -> packages/tailwindcss-language-server/tests/code-actions/code-actions.v2.test.js
diff --git a/packages/tailwindcss-language-server/tests/code-actions/code-actions.v2.test.js b/packages/tailwindcss-language-server/tests/code-actions/code-actions.v2.test.js
index d16d0c407b4e5adae322d314a62a8b25a8f3c920..8cd25a7af7280908cdb2d15e1c93db3c2d43a30e 100644
--- a/packages/tailwindcss-language-server/tests/code-actions/code-actions.v2.test.js
+++ b/packages/tailwindcss-language-server/tests/code-actions/code-actions.v2.test.js
@@ -4,32 +4,36 @@ import * as fs from 'node:fs/promises'
 
 withFixture('v2', (c) => {
   function testFixture(fixture) {
-    test(fixture, async () => {
-      fixture = await fs.readFile(`tests/code-actions/${fixture}.json`, 'utf8')
+    test(
+      fixture,
+      async () => {
+        fixture = await fs.readFile(`tests/code-actions/${fixture}.json`, 'utf8')
 
-      let { code, expected, language = 'html' } = JSON.parse(fixture)
+        let { code, expected, language = 'html' } = JSON.parse(fixture)
 
-      let promise = new Promise((resolve) => {
-        c.onNotification('textDocument/publishDiagnostics', ({ diagnostics }) => {
-          resolve(diagnostics)
+        let promise = new Promise((resolve) => {
+          c.onNotification('textDocument/publishDiagnostics', ({ diagnostics }) => {
+            resolve(diagnostics)
+          })
         })
-      })
 
-      let textDocument = await c.openDocument({ text: code, lang: language })
-      let diagnostics = await promise
+        let textDocument = await c.openDocument({ text: code, lang: language })
+        let diagnostics = await promise
 
-      let res = await c.sendRequest('textDocument/codeAction', {
-        textDocument,
-        context: {
-          diagnostics,
-        },
-      })
-      // console.log(JSON.stringify(res))
+        let res = await c.sendRequest('textDocument/codeAction', {
+          textDocument,
+          context: {
+            diagnostics,
+          },
+        })
+        // console.log(JSON.stringify(res))
 
-      expected = JSON.parse(JSON.stringify(expected).replaceAll('{{URI}}', textDocument.uri))
+        expected = JSON.parse(JSON.stringify(expected).replaceAll('{{URI}}', textDocument.uri))
 
-      expect(res).toEqual(expected)
-    })
+        expect(res).toEqual(expected)
+      },
+      10000
+    )
   }
 
   // testFixture('conflict')