Skip to content

Disable warning when opening a project without Vitest #387

Closed
@GRA0007

Description

Describe the bug

Vitest shows a warning every time I open a project that uses Vite but does not use Vitest.

vscode.window.showWarningMessage(`Vitest not found in "${basename(dirname(configOrWorkspaceFile.fsPath))}" folder. Please run \`npm i --save-dev vitest\` to install Vitest.'`)

I do not always use Vitest for various reasons, so I should be able to disable this warning with a setting like vitest.warnIfNotInstalled = false. A button on the warning like "Don't remind me again" could set this setting.

Reproduction

Open any project that uses Vite but does not use Vitest

Output

[INFO 13:50:07] [v0.10.7] Vitest extension is activated because Vitest is installed or there is a Vite/Vitest config file in the workspace.
[Error 13:50:07] [API] Vitest not found for file:///Users/*/projects/*/vite.config.ts.
[Error 13:50:07] [API] Failed to start Vitest: No vitest config files found

Version

0.10.7

Validations

Metadata

Assignees

No one assigned

    Labels

    p3-minor-bugAn edge case that only affects very specific usage (priority)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions