rubberduck-ai / rubberduck-vscode

Use AI-powered code edits, explanations, code generation, error diagnosis, and chat in Visual Studio Code with the official OpenAI API.
https://marketplace.visualstudio.com/items?itemName=Rubberduck.rubberduck-vscode
MIT License
579 stars 70 forks source link

Running tests generates an error #125

Open richardgroves opened 2 months ago

richardgroves commented 2 months ago

Describe the bug

Following the steps in the contributing guide - https://github.com/rubberduck-ai/rubberduck-vscode/blob/main/CONTRIBUTING.md I installed code, did the installs and build then tried to run the tests, and got an error.

How to reproduce

git clone git@github.com:rubberduck-ai/rubberduck-vscode.git
cd rubberduck-vscode
pnpm install
pnpm build-all

pnpm test

Expected behavior

Test complete successfuly

Screenshots

➜  rubberduck-vscode git:(main) ✗ pnpm test

> rubberduck-vscode-root@0.0.0 test /private/tmp/RD/rubberduck-vscode
> pnpm nx run extension:test

> nx run extension:test

> @rubberduck/extension@0.0.0 test /private/tmp/RD/rubberduck-vscode/lib/extension
> vitest run src/
 RUN  v0.28.3 /private/tmp/RD/rubberduck-vscode/lib/extension
filter:  src/
include: **/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}
exclude:  **/node_modules/**, **/dist/**, **/cypress/**, **/.{idea,git,cache,output,temp}/**, **/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*
watch exclude:  **/node_modules/**, **/dist/**

No test files found, exiting with code 1
 ELIFECYCLE  Test failed. See above for more details.

 —————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

 >  NX   Ran target undefined for project extension (986ms)

    ✖    1/1 failed
    ✔    0/1 succeeded [0 read from cache]

 ELIFECYCLE  Test failed. See above for more details.

➜  rubberduck-vscode git:(main) ✗ 

Additional information

My guess is that there isn't actually and test code in the extension/src folder so the test run is actually correct. In that case the guide should remove the 'Run Tests' step. OR I need to deploy the extension first/run under vscode?