Skip to content

test(async): extend #1013 coverage to cross-module property-return shape#1068

Merged
proggeramlug merged 1 commit into
mainfrom
test/1013-cross-module-coverage
May 19, 2026
Merged

test(async): extend #1013 coverage to cross-module property-return shape#1068
proggeramlug merged 1 commit into
mainfrom
test/1013-cross-module-coverage

Conversation

@proggeramlug
Copy link
Copy Markdown
Contributor

Follow-up to PR #1064 per @andrewtdiz's review feedback (comment).

PR #1064 pinned the same-file literal-return shape — covers the dispatch bug. The original gscmaster-api repro from #1013 used cross-module imported async helpers that awaited an inner lookup and returned a property read off the resolved value (return user.accessToken). That shape isn't exercised by the previous test.

This PR adds test-files/fixtures/issue_1013/user_lookup.ts exporting getAccessToken / getUserPlan against an inner await lookupUser(id), each returning a property read. The test now destructures both shapes from Promise.all:

// same-file literal — covers dispatch
const [a, b] = await Promise.all([fetchA(), fetchB()]);

// cross-module property-return — original #1013 surface
const [accessToken, userPlan] = await Promise.all([
    getAccessToken("u1"),
    getUserPlan("u1"),
]);

Verified byte-for-byte against node --experimental-strip-types.

No version bump or changelog change.

Per PR #1064 review (@andrewtdiz): the original gscmaster-api repro used
cross-module imported async helpers that awaited an inner lookup and
returned a property read off the resolved value (`return user.accessToken`).
The previous test only pinned the same-file literal-return shape, which
covers the dispatch bug but not the exact reported async/module/property
boundary.

Added `test-files/fixtures/issue_1013/user_lookup.ts` exporting
`getAccessToken` / `getUserPlan` against an inner `await lookupUser(id)`,
returning property reads. The test now destructures both shapes from
`Promise.all` and verifies byte-for-byte parity with Node.
@proggeramlug proggeramlug merged commit fcb097c into main May 19, 2026
9 checks passed
@proggeramlug proggeramlug deleted the test/1013-cross-module-coverage branch May 19, 2026 06:55
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