Skip to content

Additional test coverage for nested .await check() injection #146

@rocketman-code

Description

@rocketman-code

Context

PR #145 added recursive check() injection for nested .await expressions with 10 unit tests. Code review identified two additional test cases that would strengthen coverage.

Additional tests

  1. let x = foo().await; inside nested blocks (e.g., inside if, match) -- the common let binding pattern is covered by the general logic but has no explicit test
  2. else if with .await in the then-branch -- handled correctly by syn's ExprIf traversal of else_branch, but an explicit test would document the guarantee since ExprWhile vs ExprIf are different AST nodes

Priority

Low -- existing implementation handles both cases correctly. These are documentation-value tests that guard against future regressions if the visitor overrides change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions