grommet / grommet-toolbox

[DEPRECATED] Developer Environment for Grommet applications
Apache License 2.0
13 stars 24 forks source link

Allow running a specific unit test. #36

Closed ericsoderberghp closed 8 years ago

ericsoderberghp commented 8 years ago

It would be helpful to be able to run just a single unit test. This would allow triaging test issues via console.log without having to wade through the time and output of other tests.

alansouzati commented 8 years ago

Fixed by https://github.com/grommet/grommet-toolbox/commit/700c011d37e050274ab87697eabbbca0a74f9dac.

When the new release comes you will be able to use all the CLI options from here:

https://facebook.github.io/jest/docs/api.html#jest-cli-options

For the single unit test you are either looking for testPathPattern or testNamePattern.

testPathPattern will match the regex you set for the path of the file. Similarly testNamePattern will match the name of the test case from different files.