Răsfoiți Sursa

test(windows): use native PATH delimiter

Tianyi Cui 2 luni în urmă
părinte
comite
2a8e7c661d
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      packages/lsp/lsp-local/tests/provider.spec.ts

+ 2 - 2
packages/lsp/lsp-local/tests/provider.spec.ts

@@ -1,7 +1,7 @@
 import { afterEach, beforeEach, describe, expect, it } from 'vitest'
 import { afterEach, beforeEach, describe, expect, it } from 'vitest'
 import { chmod, mkdtemp, mkdir, rm, writeFile, realpath } from 'node:fs/promises'
 import { chmod, mkdtemp, mkdir, rm, writeFile, realpath } from 'node:fs/promises'
 import { tmpdir } from 'node:os'
 import { tmpdir } from 'node:os'
-import { join } from 'node:path'
+import { delimiter, join } from 'node:path'
 import { Context } from 'cordis'
 import { Context } from 'cordis'
 import Lsp, { type LspQueryRequest } from '@deepseek-ai/dsh-lsp'
 import Lsp, { type LspQueryRequest } from '@deepseek-ai/dsh-lsp'
 import * as LspLocal from '@deepseek-ai/dsh-lsp-local'
 import * as LspLocal from '@deepseek-ai/dsh-lsp-local'
@@ -57,7 +57,7 @@ describe('lsp-local provider resolution', () => {
     await expect(ctx.plugin(LspLocal, config('nope', {
     await expect(ctx.plugin(LspLocal, config('nope', {
       command: 'fake-lsp',
       command: 'fake-lsp',
       args: [],
       args: [],
-      env: { PATH: `::${join(root, 'empty')}` },
+      env: { PATH: `${delimiter}${delimiter}${join(root, 'empty')}` },
       extensionToLanguage: { '.ts': 'typescript' },
       extensionToLanguage: { '.ts': 'typescript' },
     }))).rejects.toThrow(/was not found on PATH/)
     }))).rejects.toThrow(/was not found on PATH/)
     await ctx.fiber.dispose()
     await ctx.fiber.dispose()