{"id":18559083,"url":"https://github.com/linux-china/vitest-jetbrains-plugin","last_synced_at":"2026-03-08T17:38:58.914Z","repository":{"id":41488410,"uuid":"474086324","full_name":"linux-china/vitest-jetbrains-plugin","owner":"linux-china","description":"Vitest JetBrains plugin","archived":false,"fork":false,"pushed_at":"2022-11-10T09:30:27.000Z","size":1892,"stargazers_count":52,"open_issues_count":13,"forks_count":6,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-02T02:51:15.419Z","etag":null,"topics":["vitest"],"latest_commit_sha":null,"homepage":"https://plugins.jetbrains.com/plugin/19220-vitest-runner","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/linux-china.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-25T16:31:51.000Z","updated_at":"2024-03-22T15:59:15.000Z","dependencies_parsed_at":"2023-01-21T20:16:29.487Z","dependency_job_id":null,"html_url":"https://github.com/linux-china/vitest-jetbrains-plugin","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":"JetBrains/intellij-platform-plugin-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linux-china%2Fvitest-jetbrains-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linux-china%2Fvitest-jetbrains-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linux-china%2Fvitest-jetbrains-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linux-china%2Fvitest-jetbrains-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linux-china","download_url":"https://codeload.github.com/linux-china/vitest-jetbrains-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248144158,"owners_count":21054876,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["vitest"],"created_at":"2024-11-06T21:42:00.219Z","updated_at":"2026-03-08T17:38:58.873Z","avatar_url":"https://github.com/linux-china.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vitest-jetbrains-plugin\n\n**Deprecated**: from WebStorm 2022.3 Beta, Vitest support by default. Please refer https://blog.jetbrains.com/webstorm/2022/11/webstorm-2022-3-beta/#Vitest_support\n\n\u003c!-- Plugin description --\u003e\nA simple WebStorm plugin to run Vitest tests.\n\n* Green Run icon means to run once only\n* Vitest Run icon to debug test or run test with watch mode\n* Test failure detection to remark run icon as red\n* Vitest json reporter integration by `.vitest-result.json` file\n\n```\n  \"scripts\": {\n    \"test\": \"vitest --watch\",\n    \"webstorm-integration\": \"vitest --watch --reporter=dot --reporter=json --outputFile=.vitest-result.json\",\n  },\n```\n\n* Vitest toolWindow to display test statistics from `.vitest-result.json` file\n\nPlease install [Awesome Console](https://plugins.jetbrains.com/plugin/7677-awesome-console) for code link/navigation from console.\n\n\u003c!-- Plugin description end --\u003e\n\n# How Vitest Runner plugin resolves working directory?\n          \n* If `workspaces` declared in `package.json`, and working directory is package's directory.\n* Vitest Runner will resolve proximate `package.json` for Vitest tested file, and working directory may be project's root directory or subdirectory of subproject.\n                \n**Attention**: for mono repository with subprojects independent, working directory will be subproject's directory, \nand Vitest Runner will use `vite.config.js` inside subproject. \n\n# Vitest debug support\n\n* How about `--coverage` support? Please add `c8` dependency in package.json and reopen the project.\n\n```json\n{\n  \"devDependencies\": {\n   \"c8\": \"^7.12.0\"\n  }\n}\n```\n\n# Screenshot\n\n![Vitest](screenshot.png)\n\n# Attention\n\nThis plugin just a temp solution before official Vitest support from WebStorm.\nI think JetBrains people will do this job, and they know Vitest is great framework.\nFor Vitest support in WebStorm, please vote here: https://youtrack.jetbrains.com/issue/WEB-54437\n\n# Vitest global support\n\nPlease enable `globals: true` for `test` in Vitest configuration file.\n\n```typescript\n// vite.config.ts\nimport {defineConfig} from 'vitest/config'\n\nexport default defineConfig({\n    test: {\n        globals: true,\n    },\n})\n```\n          \n**Exclude jest**: jest is removed from the devDependencies, anyway, jest still resolved and installed by co dependency during `npm install`. \nYou can use following solution to exclude jest: \n\n```\n\"scripts\": {\n    \"postinstall\": \"rm -rf node_modules/jest*; rm -rf node_modules/@jest\"\n}\n```\n\n**Attention**: Please reload(close/open) project if you enable `globals: true` first time.\n\n# Installation\n\n- Using IDE built-in plugin system: https://plugins.jetbrains.com/plugin/19220-vitest-runner\n\n  \u003ckbd\u003eSettings/Preferences\u003c/kbd\u003e \u003e \u003ckbd\u003ePlugins\u003c/kbd\u003e \u003e \u003ckbd\u003eMarketplace\u003c/kbd\u003e \u003e \u003ckbd\u003eSearch for \"vitest\"\u003c/kbd\u003e \u003e\n  \u003ckbd\u003eInstall Plugin\u003c/kbd\u003e\n\n- Manually:\n\n  Download the [latest release](https://github.com/linux-china/vitest-jetbrains-plugin/releases/latest) and install it manually using\n  \u003ckbd\u003eSettings/Preferences\u003c/kbd\u003e \u003e \u003ckbd\u003ePlugins\u003c/kbd\u003e \u003e \u003ckbd\u003e⚙️\u003c/kbd\u003e \u003e \u003ckbd\u003eInstall plugin from disk...\u003c/kbd\u003e\n\n# References\n\n* Vitest VS Code plugin: https://marketplace.visualstudio.com/items?itemName=ZixuanChen.vitest-explorer\n* Awesome Console plugin: https://plugins.jetbrains.com/plugin/7677-awesome-console\n* Building a Plugin for WebStorm – Tutorial for JavaScript Developers: https://blog.jetbrains.com/webstorm/2021/09/building-a-plugin-for-webstorm-part-1/","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinux-china%2Fvitest-jetbrains-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinux-china%2Fvitest-jetbrains-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinux-china%2Fvitest-jetbrains-plugin/lists"}