Git Product home page Git Product logo

Comments (10)

13OnTheCode avatar 13OnTheCode commented on September 8, 2024

I'm in a similar situation too.

from vscode.

watonyweng avatar watonyweng commented on September 8, 2024

Hi @christophsturm, you may need to run node setup.mjs first, then append "vitest.enable": true to .vscode/settings. json file, and finally reopen VSCode.

from vscode.

christophsturm avatar christophsturm commented on September 8, 2024

that fixes it. now I just need to find out why it does not run in my monorepo.

it would be really helpful if you updated all the sample projects to vitest 1.1.0

from vscode.

cyrfer avatar cyrfer commented on September 8, 2024

I just created a new monorepo, added a vitest.workspace file, and multiple packages depend on vitest. I can run vitest in the CLI with no problem, at the workspace level and for each package.

I installed this vscode extension and vscode's Testing tab shows "No tests have been found in this workspace yet" (same as OP).

I added "vitest.enable": true to .vscode/settings.json, and restarted vscode. No luck.

What is setup.mjs?

from vscode.

ennioVisco avatar ennioVisco commented on September 8, 2024

I just created a new monorepo, added a vitest.workspace file, and multiple packages depend on vitest. I can run vitest in the CLI with no problem, at the workspace level and for each package.

I installed this vscode extension and vscode's Testing tab shows "No tests have been found in this workspace yet" (same as OP).

I added "vitest.enable": true to .vscode/settings.json, and restarted vscode. No luck.

What is setup.mjs?

They refer to this file from the sample project you should use for reproductions

from vscode.

jseto avatar jseto commented on September 8, 2024

Hi @christophsturm, you may need to run node setup.mjs first, then append "vitest.enable": true to .vscode/settings. json file, and finally reopen VSCode.

Not working for me. Didn't get any message when the test fails, only the red icon.

This is the output from setup

{
  "System": {
    "OS": "Linux 6.2 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)"
  },
  "Binaries": {
    "Node": {
      "version": "20.9.0",
      "path": "~/.nvm/versions/node/v20.9.0/bin/node"
    },
    "Yarn": "Not Found",
    "npm": {
      "version": "10.2.1",
      "path": "~/.nvm/versions/node/v20.9.0/bin/npm"
    }
  },
  "IDEs": {
    "VSCode": {
      "version": "1.85.1",
      "path": "/usr/bin/code"
    }
  },
  "npmPackages": {
    "vite": {
      "installed": "5.0.11",
      "wanted": "^5.0.11"
    },
    "vitest": {
      "installed": "1.1.3",
      "wanted": "^1.1.3"
    }
  }
}

And here is the screenshot of a failing test

image

from vscode.

brion-fuller avatar brion-fuller commented on September 8, 2024

I believe this is similar to #198 (comment)

from vscode.

jseto avatar jseto commented on September 8, 2024

I believe this is similar to #198 (comment)

Yes. It is. Sorry for not finding #198 before commenting.

from vscode.

joshhsiao333 avatar joshhsiao333 commented on September 8, 2024

Successful fixed by blow steps:

clone blow github repo
git clone https://github.com/zxch3n/vitest-ext-basic-example.git

Under project root, run
node setup.mjs
It will Install deps
Update Vitest extension to the latest pre-release version
Unify Vitest settings
Log env info to info.txt

if 'C:\Users\xxxx\AppData\Local\Programs\Microsoft' is not recognized as an internal or external command' error occurred. Modify line 44 of setup.mjs to
`"${code}" --install-extension zixuanchen.vitest-explorer --pre-release --force`
This will fix setup.mjs when vscode installation path contains spaces

Downgrade to v0.2.42

Open/Reload this project in VS Code
Test Vitest extension on this project.

from vscode.

MilanKovacic avatar MilanKovacic commented on September 8, 2024

This issue will be resolved when #213 lands.

from vscode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.