- There are advantages to having an intact version of randomtest available as well.
- (relayed from the coder):
The actual engine uses console.log all over the place. If you comment out the lines in randomtest.js that redirect console.log to the screen (roughly lines 55-65), then you won’t get any output at all - not precisely optimal.
If, on the other hand, you just comment out the calls to console.log within randomtest.js, you won’t get any of the randomtest-specific messages (like “*****Seed 1” or “RANDOMTEST PASSED”) but you will still get all of the ChoiceScript engine debugging output, which is the vast majority of the output generated by the randomtest tool.
The alteration specifically assigns console.log to be a no-op so that all the normal ChoiceScript logging output gets suppressed, but the final line-by-line stats are still available. The one potential improvement I could see would be to make this behavior dependent on options selected in the randomtest form, so that users could have more control over exactly what output gets displayed by the tool, but I didn’t want to make changes to the original source files, since those are part of the ChoiceScript boilerplate.