docs
docs copied to clipboard
HOWTO create a Scala kata
- Test suite styles: https://www.scalatest.org/user_guide/selecting_a_style
- Be careful with generated tests: test suite crashes with incomprehensible error if names of test cases are not unique
- Long startup time
- Be aware of java interop for kata with code restrictions
- How to override default assertion messages?
- ScalaTest does shrinking itself and doesn't care how input is generated, so if, for example, a ScalaCheck generator is used to generate only positive numbers, ScalaTest still can shrink it to zero, so an additional constraint is needed to discard invalid input. (Although I don't remember anyone else using generators is Scala at all.)
A translation with custom clues, and sequential execution: https://www.codewars.com/kumite/62c852fc8984fe000eb07db0?sel=62c85c4176acd6000e12037a
"Comparison of Scala test styles" kumite: https://www.codewars.com/kumite/62defdd51b6b8313b95ec22e?sel=62defdd51b6b8313b95ec22e