Description
What is the problem this feature will solve?
As a developer, I want to be able use test runner programmatically via 'run' function and execute only tests marked with 'only' option. Currently it's possible only via CLI be adding '--test-only' parameter, or with dirty hack (see alternatives section).
What is the feature you are proposing to solve the problem?
Add 'testOnly' to 'run' parameters, similar to existing 'watch' or 'testNamePatterns'. It would be nice to have all test runner options available both on CLI and runtime API.
What alternatives have you considered?
Add '--test-only' to NODE_OPTIONS env variable before 'run' call. It works fine, but looks a bit ugly.