feat(icon): provide standalone-friendly APIs for icon registry testing
- Lenguaje dominante
- TypeScript
- Estrellas
- 25k
- Forks
- 6.8k
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 91
Descripción
### 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(), /* ... */],
// ...
})
```
Guía de contribución
Línea de trabajo
Empieza leyendo las implementaciones existentes de MatIconTestingModule y FakeMatIconRegistry y, después, compara el uso actual de providers de TestBed con la API standalone solicitada. La tarea estará terminada cuando los usuarios puedan usar provideFakeIconRegistry() en providers en lugar de MatIconTestingModule o de la asignación manual de MatIconRegistry, manteniendo el comportamiento del registro simulado.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- angular, typescript
- Área
- testing
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 48/100