`neovim zipfile scheme handling with yarn pnp > returns zipfile: uri for definition inside node_modules` test failure on `4.3.2`
polyzen opened this issue · comments
Daniel M. Capella commented
Getting this failure when trying to bump the package for Arch Linux:
yarn run v1.22.21
$ cross-env CONSOLE_LOG_LEVEL=warning vitest run
RUN v1.2.2 /build/typescript-language-server/src/typescript-language-server
✓ src/utils/previewer.test.ts (13 tests) 5ms
✓ src/utils/modules-resolver.test.ts (2 tests) 2ms
✓ src/ts-client.test.ts (4 tests) 757ms
❯ src/configuration/fileSchemes.test.ts (6 tests | 1 failed) 1041ms
❯ src/configuration/fileSchemes.test.ts > neovim zipfile scheme handling with yarn pnp > returns zipfile: uri for definition inside node_modules
→ expected 'file:///build/typescript-language-ser…' to match /zipfile:\/\/.+.zip::node_modules\/axios\/.+/
✓ src/features/call-hierarchy.test.ts (2 tests) 1054ms
✓ src/file-lsp-server.test.ts (2 tests) 1581ms
✓ src/lsp-server.test.ts (59 tests) 9424ms
⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯
FAIL src/configuration/fileSchemes.test.ts > neovim zipfile scheme handling with yarn pnp > returns zipfile: uri for definition inside node_modules
AssertionError: expected 'file:///build/typescript-language-ser…' to match /zipfile:\/\/.+.zip::node_modules\/axios\/.+/
❯ src/configuration/fileSchemes.test.ts:83:32
81| const defintion = Array.isArray(results) ? results[0] as lsp.L…
82| expect(defintion).toBeDefined();
83| expect(defintion!.uri).toMatch(/zipfile:\/\/.+.zip::node_modul…
| ^
84| });
85| });
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯
Test Files 1 failed | 6 passed (7)
Tests 1 failed | 87 passed (88)
Start at 16:40:08
Duration 12.12s (transform 2.89s, setup 1ms, collect 9.68s, tests 13.86s, environment 1ms, prepare 2.52s)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I had to cherry-pick 291afb3 to get yarn --frozen-lockfile
to work, but this error also occurs if I install with just yarn
.
Rafał Chłodnicki commented
This test relies on the project in the test-data/yarn-pnp/
directory to have dependencies installed with yarn 4. yarn 4 manages packages in a compressed form so there is no direct access to the files in node_modules.
Daniel M. Capella commented
Thank you, I seem to have figured it out.