Add withTests option for controlling the number of tests.