asgardeo / asgardeo/javascript

chore: add unit test coverage for untested code paths in `@asgardeo/browser`

Abierto
#166 5 comentarios 0 reacciones 0 asignados Ver en GitHub
@asgardeo/browser Complexity/Medium Type/Improvement Type/Task
Lenguaje dominante
TypeScript
Estrellas
18
Forks
67
Merge medio
4 h 6 min
PR fusionados (30 d)
13

Descripción

### Current Limitation

Some code paths and edge cases in @asgardeo/browser are not covered by unit tests, leading to reduced confidence in code changes, potential bugs, and lower test coverage.

- Reduced confidence in code changes and refactoring
- Potential undetected bugs in less common scenarios
- Lower overall test coverage metrics
- Increased manual testing effort
- Difficulty in maintaining code quality over time

Without adequate unit tests, the codebase may contain:

- Functions or methods that are not validated for all input variations
- Edge cases that may break silently
- Logic errors that are only caught in integration or production environments

### Suggested Improvement

Identify and add unit tests for untested code paths and edge cases in @asgardeo/browser. Improve test coverage and reliability.

## Implementation Plan

1. Review the latest code coverage to identify untested lines/branches.
2. Select a function, method, or component that lacks test coverage.
3. Write a new unit test that:
- Covers normal, boundary, and invalid input cases
- Asserts correct output and expected error handling
4. Run the test suite to confirm the new test is effective and passes.
5. Update documentation or test coverage badges as necessary.

**References:**
- https://vitest.dev/
- [Improving test coverage](https://blog.codecov.io/how-to-improve-code-coverage-ec7d5c5e1236/)

### Please select the package issue is related to

@asgardeo/browser

### Version

Current

### Reporter Checklist

- [x] I have searched the existing issues and this is not a duplicate.
- [x] I have provided all the necessary information.
- [x] I have verified the improvement is not available in the latest version of the package.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza revisando la cobertura más reciente del paquete @asgardeo/browser y ejecutando su conjunto existente de pruebas unitarias con Vitest para identificar líneas y ramas no probadas. Selecciona una función, método o componente específico y añade pruebas para entradas normales, límite y no válidas; el trabajo estará terminado cuando las pruebas pasen y las rutas seleccionadas estén cubiertas.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
typescript
Área
testing
Tipo de issue
Refactorización
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
38/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.