I’m trying to find out how to test workflows but can’t find anything (or really, Codex can’t figure it out). As I understand, there’s no guidance, docs, or examples (surprisingly ). Has anyone figured anything out that works well?
I tried createLocalWorld which looks like the right direction generally but I’m running into problems, specifically:
WorkflowRunNotFoundError: Workflow run "wrun_01KFFTQVMXDA021KBEBGMR95ST" not found
The local world is the right choice for testing, it’s what Next will use during development too. Do you see any of your test runs appear when you run the observability tools?
# View runs with CLI
npx workflow inspect runs
# View runs with Web UI
npx workflow inspect runs --web
I checked with the workflow team and we have an official vitest plugin on the roadmap, but in the meantime Mux got workflows working in Vitest using the Vite adapter
I just (finally, after way too much digging ) realized I can’t mock the network in my tests since the workflows execute in a separate process which limits the approach pretty substantially for real-world projects? Any news on official testing harness? I have to say I find it a bit surprising this has been out for so long without a clear and supported way for testing workflows.