Closed slashOwO closed 4 months ago
Codewars uses Busted in pretty much normal way, and does no custom things when running Busted tests except using the Codewars reporter for Busted. So the expectation is that Busted tests run on CW behave pretty much the same as Busted tests run outside of CW. It is true that CW output handler does not set the random seed, but:
busted
runner and I actually cannot see how and where it sets the global random seed. As far as I see (but I might have missed something), it does so only when the -shuffle-files
or -shuffle-tests
option is used, and random seed is seeded only when you request a random order of tests with command line (which CW does not do, and also is not related to logic of generating inputs).Can you please make double sure that outside of CW, when no additional command line parameters are used, the random seed is set by the runner?
I did some more testing and found out that the Lua interpreter I am using (Lua 5.4) sets the random seed, not busted. Sorry.
Is your feature request related to a problem? Please describe. In Lua,
math.random()
always generates the same number if a random seed is not set.Describe the solution you'd like Add
math.random(os.time())
to the Lua output handler.