feat(icon): provide standalone-friendly APIs for icon registry testing
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
### Feature Description
It would be nice to have a standalone `provideFakeIconRegistry` function to provide the `MatIconRegistry` with `FakeMatIconRegistry` as a replacement for using `MatIconTestingModule`.
This feature request is motivated by the want to enforce standalone APIs way of doing.
Just like the effort made in this commit : https://github.com/angular/components/commit/7840cd3a779b6e7388971e279bd60de2bcb1e89b
### Use Case
Replace :
```ts
TestBed.configureTestingModule({
imports: [MatIconTestingModule, /* ... */],
// ...
})
// OR
TestBed.configureTestingModule({
providers: [
//...
{
provide: MatIconRegistry,
useClass: FakeMatIconRegistry,
},
],
// ...
})
```
By :
```ts
TestBed.configureTestingModule({
providers: [provideFakeIconRegistry(), /* ... */],
// ...
})
```
コントリビューションガイド
調査の方向性
まず既存の MatIconTestingModule と FakeMatIconRegistry の実装を読み、現在の TestBed の provider の使用方法を、要求されている standalone API と比較します。MatIconTestingModule や MatIconRegistry の手動マッピングの代わりに、呼び出し側が providers で provideFakeIconRegistry() を使用でき、かつ fake registry の動作が維持されていれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- testing
- issue の種類
- 機能追加
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 48/100