how do we test the workflow using

how do we test the workflow using wrangler dev?
✔ script to run › dev

> workflows-starter@0.0.1 dev /Users/am/Coding/2024/workflows-starter
> wrangler dev


⛅️ wrangler 3.83.0
-------------------

Your worker has access to the following bindings:
- Workflows:
- MY_WORKFLOW: MyWorkflow
⎔ Starting local server...
[wrangler:inf] Ready on http://localhost:8787
✔ script to run › dev

> workflows-starter@0.0.1 dev /Users/am/Coding/2024/workflows-starter
> wrangler dev


⛅️ wrangler 3.83.0
-------------------

Your worker has access to the following bindings:
- Workflows:
- MY_WORKFLOW: MyWorkflow
⎔ Starting local server...
[wrangler:inf] Ready on http://localhost:8787
4 Replies
sdr
sdr4w ago
If you ping this endpoint you can see any of your worker log statements http://localhost:8787/ Make sure to pass some dummy id or a uuid into the create command though
let instance = await env.MY_WORKFLOW.create({
id: 'something',
});
let instance = await env.MY_WORKFLOW.create({
id: 'something',
});
DiamondDragon
DiamondDragonOP4w ago
this is what i get pinging the endpoint
No description
sdr
sdr4w ago
Yeah so in that .create() command pass .create({id: 'something'}) Its trying to destructure params which are not present so you have to give it some
Seekerdasbatatas
yeah this is a known bug in local dev (works properly in prod)
Want results from more Discord servers?
Add your server