Cloudflare DevelopersCD
Cloudflare Developersβ€’3y agoβ€’
4 replies
TravisFrank

MrBBot 4470 I m writing tests `vitest

@mrbbot I'm writing tests (vitest-environment-miniflare) for a worker that binds another worker. The other worker has a DO, and I've bound that DO to the original worker as well. I want to seed an instance of the DO for tests, but I'm running into trouble because constructing that DO requires the other worker's env (to fetch another bound worker). Is there a way to get the other env, or a different pattern I should be using to seed the DO?
Was this page helpful?