Vitest integration lacks programmatic API for IDEs and advanced tooling
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- angular, typescript
調査の方向性
ファイルやテストは指定されていません。まず Angular CLI の Vitest 統合と、Vitest インスタンスを構築、設定、作成するコードを探し、関連する issue のリンクを確認して既存のコンテキストを把握してください。サポートされる外部エントリポイントから、作成前の設定オーバーライドと基盤となる Vitest インスタンスへのアクセスを、CLI の内部実装を重複させることなく提供できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Command
test
Description
Angular CLI’s current Vitest integration does not expose a supported programmatic integration surface for external tooling.
For advanced tooling such as mutation testing (StrykerJS) and IDE integrations, two capabilities are required, both of which are currently blocked:
-
The ability to override or extend the Vitest configuration at runtime.
This is needed to run Vitest in a mutation-testing mode, for example to change includes/excludes, disable threading, adjust environments, add setup files, or tweak dependency handling. -
Access to the Vitest instance itself, so external tools can use Vitest APIs such as the
provideAPI for mutant switching (injecting or replacing values during test execution).
VitestprovideAPI documentation: https://main.vitest.dev/api/advanced/vitest.html#provide
At the moment, Angular CLI fully encapsulates Vitest creation and configuration. As a result, external tools cannot integrate without re-implementing Angular CLI internals.
This issue is not limited to StrykerJS. Other tools in the ecosystem are running into the same limitation:
- The Vitest VS Code extension cannot detect or execute tests in Angular projects using the CLI Vitest setup:
https://github.com/vitest-dev/vscode/issues/686 - IDE and external tooling compatibility issues around Vitest are already being tracked by the Angular CLI team:
https://github.com/angular/angular-cli/issues/31734
We’d also like to thank the Angular team for the long-standing collaboration with the tooling ecosystem, and with StrykerJS in particular. Changes in Angular CLI over the years made it possible for tools like StrykerJS to support Angular with Karma reliably for a long time, and we really appreciate that effort. We hope we can work something out together again so the new Vitest-based architecture remains just as extensible and ecosystem-friendly.
Describe the solution you'd like
We would like Angular CLI to expose a stable, supported API for its Vitest integration that external tools can build upon.
Concretely, this would include:
-
Runtime Vitest config overrides before instance creation
External tooling should be able to provide or merge Vitest configuration before the Vitest instance is created. This is required for use cases like mutation testing, where tools need to adjust runner-level behavior such as threading, test selection, setup files, or environment options. -
Access to the actual Vitest instance
External tools need access to the real Vitest instance so they can:- Use the Vitest
provideAPI for mutant switching and other runtime injections - Control test execution (for example related tests, name pattern filtering, or repeated runs)
- Reset or manage internal state between runs in a supported way
- Use the Vitest
-
An exported helper function, for example
buildAndCreateVitest(...)This helper would:
- Perform the Angular build
- Load the compiled files into memory
- Create and return the configured Vitest instance
It should also:
- Allow pre-create Vitest config overrides
- Work when invoked from an external tool’s execution context (such as a sandbox directory with modified or mutated files)
- Return the underlying, mutable Vitest instance, not just a “run tests” abstraction
Tools like StrykerJS could then call this function from their Vitest test runner instead of duplicating Angular CLI internals or relying on fragile workarounds.
Providing this kind of integration point would significantly improve compatibility with IDE plugins, mutation testing tools, and other advanced testing or analysis tooling, while keeping Angular CLI as the single source of truth for how Vitest is configured and executed in Angular projects.
Describe alternatives you've considered
-
Using Analog’s Vitest integration, which exposes a more standard and tool-friendly Vitest setup:
https://analogjs.org/docs/features/testing/vitestWhile this can work as a workaround, it is not a good long-term solution for Angular CLI users. It requires manual configuration by the user, is not officially supported by Angular CLI, and does not provide an out-of-the-box Angular experience. As a result, tooling would only work for users who opt into a specific non-CLI setup, rather than working by default for Angular projects.
-
Custom scripts that build Angular separately and invoke Vitest outside Angular CLI.
These approaches are brittle, bypass CLI guarantees, duplicate Angular internals, and are difficult to maintain over time.
Ultimately, both alternatives shift complexity to end users or tooling authors and fragment the ecosystem. A supported integration point in Angular CLI would allow tools to work out of the box for Angular projects.
- 主要言語
- TypeScript
- スター
- 27k
- フォーク
- 11.8k
- 平均マージ
- 16時間 35分
- マージ済み PR(30日)
- 176
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
angular/angular-cli のほかの issue
-
area: @angular/build gemini-triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
angular/angular-cli#33955 ·
-
area: @angular/cli gemini-triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
angular/angular-cli#33055 · コメント 1 件 · リアクション 3 件 ·
-
area: @angular/build gemini-triaged
難易度 4/5 3〜5日 初心者へのやさしさ 72/100
angular/angular-cli#34137 ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34131 · 担当者 1 名 ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34130 · 担当者 1 名 ·
angular/angular-cli の issue をすべて見る
似ている issue
-
comp/desktop P3 type/bug
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
NousResearch/hermes-agent#118866 ·
-
Browser Waiting for: Product Owner
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
getsentry/sentry-javascript#24577 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
agilepathway/label-checker#640 ·
-
Plugin stuck at "loading" on DSH 0.1.6-alpha.2 — turnTail list slot registration missing options.id オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
chrisparsons83/flexspotff#153 ·