Skip to content

Don't patch test global environment#161

Open
ferntheplant wants to merge 2 commits intoget-convex:mainfrom
ferntheplant:ferntheplant/dont-patch-test-environment
Open

Don't patch test global environment#161
ferntheplant wants to merge 2 commits intoget-convex:mainfrom
ferntheplant:ferntheplant/dont-patch-test-environment

Conversation

@ferntheplant
Copy link
Copy Markdown

Workflow global patches apply to the entire test environment which breaks the test scheduler using setTimeout. I run this monkey-patch for my tests and it seems to work fine.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Nov 3, 2025

Open in StackBlitz

npm i https://pkg.pr.new/get-convex/workflow/@convex-dev/workflow@161

commit: 686380b

Copy link
Copy Markdown
Member

@ianmacartney ianmacartney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@ianmacartney
Copy link
Copy Markdown
Member

@ferntheplant I've made improvements to convex-test and workflow so globals get restored and there's more isolation between tests. I'd love to know if they work for you without the monkey-patching?

@ferntheplant
Copy link
Copy Markdown
Author

@ianmacartney I removed my patch and upgraded to 0.3.9 and my full test suite - including at least 100 tests that run workflows - still fully passes. Thanks!

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.

2 participants