Run test suits in serial fashion in vitest #1067
raviSussol
started this conversation in
General
Replies: 2 comments 1 reply
-
Ypu can run tests with |
Beta Was this translation helpful? Give feedback.
1 reply
-
You could use descibe.each as well, if you want a serial run for only one test suite. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How can I run test suits in serial way using vitest like we do in the jest with
--runInBand
flag? I have abuild
function which builds a test server and it has 2 life cycle hook functionsbeforeAll
andafterAll
used inside thatbuild
function. For instance,and this function is used in multiple testing files to use that same test server. Now the problem is with command
vitest
those multiple test suits runs in parallel of which thebeforeAll
tries to be executed all at once wherever it has been used in multiple files. So initializing of same server app in same instance all at once doesn't help to run server and thus the testing suits are quit. I have a same setup but in jest and with the--runInBand
flag the test suits run in sequential which help to start and close the server in sequential manner leading other testing suits to restart it from scratch.So I was wondering how I can run test suits in sequential way same like it can be done in jest but using vitest. Any help would be really appreciatated. Thanks.
Beta Was this translation helpful? Give feedback.
All reactions