vitest-dev / vitest-dev/vscode
Vitest extension doesn't run test files with tags
Open
@sheremet-va is already working on this.
Since Aug 1, 2026.
- #800 by @copilot-swe-agent — closed without merging
pending triage
- Dominant language
- TypeScript
- Stars
- 924
- Forks
- 122
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 6
Description
Describe the bug
I am using tags in my unit tests and noticed that the Vitest extension for Visual Studio Code cannot run tests that are having tags declared.
Screenshot:
Expected behavior
Tests are being executed.
Reproduction
Build a test case with tags, i.e.
describe('getResultOrThrow', () => {
it('identifies an up-trending asset by a positive ROC', {tags: ['tulipindicators']}, () => {
// ...
});
});
The extension cannot run the test although the tags are defined in the vites.config.ts file:
import { defineConfig, mergeConfig } from "vitest/config";
import baseConfig from "../../vitest.config.base";
export default mergeConfig(
baseConfig,
defineConfig({
test: {
tags: [
{
description: "...",
name: "tulipindicators",
},
],
},
}),
);
My vitest.config.base.ts file looks like this:
import {defineConfig} from 'vitest/config';
export default defineConfig({
esbuild: {
/*
* Allows using the "accessor" keyword in TypeScript:
* https://github.com/vitest-dev/vitest/issues/5976#issuecomment-2190804966
*/
target: 'es2022',
},
test: {
bail: 1,
coverage: {
exclude: ['src/start/**'],
include: ['src/**'],
provider: 'v8',
reporter: ['html', 'lcov', 'text'],
},
environment: 'node',
globals: true,
// https://main.vitest.dev/guide/learn/writing-tests-with-ai.html#mock-cleanup
restoreMocks: true,
sequence: {
concurrent: true,
shuffle: true,
},
},
});
Output
> Error: The Vitest config does't define any "tags", cannot apply "tulipindicators" tag for this test. See: https://vitest.dev/guide/test-tags
Extension Version
1.50.8
Vitest Version
4.1.10
Validations
- Check that you are using the latest version of the extension
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.