Skip to content

refactor: reduce code complexity in test/api.js#341

Open
TonyHeeee wants to merge 1 commit into
mainfrom
donglinh/task-1-chatbot
Open

refactor: reduce code complexity in test/api.js#341
TonyHeeee wants to merge 1 commit into
mainfrom
donglinh/task-1-chatbot

Conversation

@TonyHeeee

Copy link
Copy Markdown
  • Extract 8 helper functions (testPathParameters, testParameterExamples, validateRequestBody, performRequest, checkStatusCode, checkResponseBody, maybeRelogin, buildBody) to simplify generateTests and related test logic
  • Fix operator-linebreak style issues with ternary operators
  • Remove duplicate buildBody function definition
  • Improves readability and maintainability while keeping all functionality intact

- Extract 8 helper functions (testPathParameters, testParameterExamples, validateRequestBody, performRequest, checkStatusCode, checkResponseBody, maybeRelogin, buildBody) to simplify generateTests and related test logic
- Fix operator-linebreak style issues with ternary operators
- Remove duplicate buildBody function definition
- Improves readability and maintainability while keeping all functionality intact
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant