You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some times tests do things they shouldn't do, like modify global state or writes something to a db that doesn't get cleaned up. When we run tests in the same order, these issues can leave sneaky defects.
In fact, RSpec now runs the tests randomly by default.
What is the feature you are proposing to solve the problem?
I propose a flag and a seed would be passed to the runner to randomize the order of the tests. The tests would then run in a random order (determined by the seed).
The seed would allow us to replicate a run in case there was an issue and we wanted to run in the same order again.
What alternatives have you considered?
I was using Jest in the past and would use this flag extensively. I want to stay with Bun, bc the performance is so good. I cannot find any good work arounds in the Bun ecosystem.
The text was updated successfully, but these errors were encountered:
What is the problem this feature would solve?
Some times tests do things they shouldn't do, like modify global state or writes something to a db that doesn't get cleaned up. When we run tests in the same order, these issues can leave sneaky defects.
Many other runners have this functionality. Here are 2 examples.
https://jestjs.io/docs/cli#--randomize
https://rubydoc.info/gems/rspec-core/RSpec%2FCore%2FConfiguration:seed
In fact, RSpec now runs the tests randomly by default.
What is the feature you are proposing to solve the problem?
I propose a flag and a seed would be passed to the runner to randomize the order of the tests. The tests would then run in a random order (determined by the seed).
The seed would allow us to replicate a run in case there was an issue and we wanted to run in the same order again.
What alternatives have you considered?
I was using Jest in the past and would use this flag extensively. I want to stay with Bun, bc the performance is so good. I cannot find any good work arounds in the Bun ecosystem.
The text was updated successfully, but these errors were encountered: