Commit 47d9afe
committed
refactor: refactor tests to table-driven style and simplify router logic
- Refactor tests to use table-driven style, reducing repetition and increasing maintainability
- Consolidate similar assertion patterns into loops and test tables for better scalability
- Replace multiple standalone test cases with grouped, parameterized subtests
- Simplify router handler definitions to single-line functions
- Update assertions to use the expected, actual parameter order for clarity
- Replace repeated origin validation checks with comprehensive test sets using maps of origins to expected results
- Refactor control flow using switch statements for clarity in testing multi-group router logic
- Minor code cleanup, such as variable renaming and removing redundant comments
Signed-off-by: appleboy <[email protected]>1 parent f65f3f7 commit 47d9afe
1 file changed
+349
-465
lines changed
0 commit comments