-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[Workflows/vitest-pool-workers] Add a test handler to get the result of a workflow instance #11648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Workflows/vitest-pool-workers] Add a test handler to get the result of a workflow instance #11648
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
|
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
d70d9a9 to
93028fc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me overall. But please get a review from your team too (Update: I missed the reivew above 😅 ) :)
d4d6059 to
d2ba6d8
Compare
d2ba6d8 to
23c29ca
Compare
23c29ca to
a5dd99d
Compare
…of a workflow instance (cloudflare#11648) * [Workflows/vitest-pool-workers] Add Workflows result testing utils * [Workflows/vitest-pool-workers] Add a test handler to get the result of a workflow instance
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.