[Workflows/vitest-pool-workers] Add a test handler to get the result of a workflow instance#11648
Merged
petebacondarwin merged 2 commits intomainfrom Dec 23, 2025
Merged
Conversation
🦋 Changeset detectedLatest commit: a5dd99d The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
b10a473 to
4d03906
Compare
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
4d03906 to
14d7720
Compare
Contributor
|
Claude finished @pombosilva's task —— View job Changeset ReviewReviewing changeset files...
✅ All changesets look good The changeset follows all guidelines:
Cuteness Report: This is Kiara. She's living her best life on the grass doing a full-body smile with her tongue out. Absolute queen of relaxation. Champion snorer according to reports. 14/10 would give all the pets. |
b28e84f to
58ec74c
Compare
avenceslau
approved these changes
Dec 18, 2025
d70d9a9 to
93028fc
Compare
edmundhung
reviewed
Dec 19, 2025
d4d6059 to
d2ba6d8
Compare
edmundhung
approved these changes
Dec 19, 2025
d2ba6d8 to
23c29ca
Compare
23c29ca to
a5dd99d
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes WOR-1059.
Introduces two new test handlers to workflow instances in vitest-pool-workers:
getOuput(): retrieves the output of a successful instancegetError(): retrieves the error info of a failed instanceI decided to introduce these as two separate functions rather than having one single function like
getResultso tests end up more readable, and to not confuse between outputs that might have the same error structure ({name: string, message: string})These are intended to be used after the workflow instance has reached either a
completeorerroredstate, thus should be called after awaitForStatus({status: <status>}).A picture of a cute animal (not mandatory, but encouraged)

Meet Kiara, my cousin's dog. She loves to snore.