Skip to content

fix(scripting-methods): bru.getTestResults() returns empty results - #75

Closed
sachin-bruno wants to merge 1 commit into
usebruno:mainfrom
sachin-bruno:sachin-bruno/bug-get-test-results
Closed

sachin-bruno wants to merge 1 commit into
usebruno:mainfrom
sachin-bruno:sachin-bruno/bug-get-test-results

Conversation

@sachin-bruno

@sachin-bruno sachin-bruno commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Ref: BRU-4512

##Problem
In the Collection Docs Playground, bru.getTestResults() returns the correct shape ({ summary, results }) but the payload is always empty results: [] and every summary counter at 0 , even though earlier tests in the same request have already run and passed.

##Fix
getTestResults now awaits the read before building its response. Since getResults() hands back the live array by reference, that one tick of delay lets the queued results land before the summary and the list are built.

Before
image

After
image

@changeset-bot

changeset-bot Bot commented Sep 9, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: e902289

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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