Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Developer workflow: added auto generated workspace file from vitest extension in vscode #4997

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nadr0
Copy link
Collaborator

@nadr0 nadr0 commented Jan 10, 2025

Issue

How can devs run vitest in vscode with debug mode?

Implementation

I installed the latest vitest extension published by vitest. The extension complained about multiple config files and then suggested a workspace file to be generated. I am committing the auto generated file which let me run the tests.

Steps to run vitest + vscode

  • Install vitest from vitest
  • Create a file called vitest.workspace.ts in the root of modelingapp (I created this file automatically when I pressed the button when it suggested this file to be created. Don't know if we need to change anything)
  • Go to testing pane and click the refresh icon
  • You can now run tests from the testing pane or the *.test.ts files.
  • Some vitest files require localhost:3000 to serve "GET /wasm_lib_bg.wasm" "node-fetch"
  • Open a terminal and run yarn simpleserver:bg in the modelingapp directory.
  • You can kill the server with yarn kill-port 3000 or your favorite way to kill the port.

The localhost server serves the .wasm file.

Copy link

qa-wolf bot commented Jan 10, 2025

QA Wolf here! As you write new code it's important that your test coverage is keeping up.
Click here to request test coverage for this PR!

Copy link

vercel bot commented Jan 10, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
modeling-app ✅ Ready (Inspect) Visit Preview Jan 10, 2025 3:30pm

Copy link
Collaborator

@jtran jtran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Thanks!

Copy link

codecov bot commented Jan 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.84%. Comparing base (a77fa63) to head (844044a).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4997   +/-   ##
=======================================
  Coverage   85.84%   85.84%           
=======================================
  Files          88       88           
  Lines       31432    31432           
=======================================
  Hits        26984    26984           
  Misses       4448     4448           
Flag Coverage Δ
wasm-lib 85.84% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants