asgardeo / asgardeo/javascript

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

未关闭
#167 9 条评论 0 个 reaction 已指派 1 人 已被 @Kavidu23 认领 在 GitHub 查看
@asgardeo/react Complexity/Medium Credits/30 Hacktoberfest Type/Improvement Type/Task
主要语言
TypeScript
星标
18
派生
67
平均合并
4 小时 6 分钟
30 天内合并 PR
13

描述

### Current Limitation

Some code paths and edge cases in @asgardeo/react 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/react. 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/express

### 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.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。