-
Been using anviljs with vitest and am currently starting up a new chain One thing I noticed is that if I kill a test with Is there some recommended way to setup tests to handle interrupts? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Yeah, I also observed that in my first experiments with the test setup. Vitest doesn't cleanly / gracefully shutdown the worker threads when the main process is terminated. To my knowledge, there's no way for us to do anything about this sadly. If you want to spawn your instances in That said, we've since discovered that it's actually better to NOT spawn the processes in |
Beta Was this translation helpful? Give feedback.
Yeah, I also observed that in my first experiments with the test setup. Vitest doesn't cleanly / gracefully shutdown the worker threads when the main process is terminated. To my knowledge, there's no way for us to do anything about this sadly. If you want to spawn your instances in
beforeEach
andafterEach
directly in the worker threads (without the global proxy), then you'll have to open an issue in thevitest
repository to get this resolved. I'm not sure why it currently behaves like this and whether they'd be open to improving / changing that or not.That said, we've since discovered that it's actually better to NOT spawn the processes in
beforeEach
andafterEach
anyways and instead s…