Ava: Possible to execute a single test function from within a test file containing several?

Created on 22 Dec 2017  路  4Comments  路  Source: avajs/ava

Hi There,

I am wondering if I can instruct ava to execute a single test function defined in a file which contains several test functions. Is this possible and if so, how would I do this?

Thanks,
-Denali

Most helpful comment

new link for 2019 - https://github.com/avajs/ava/blob/master/docs/05-command-line.md#running-tests-with-matching-titles

All 4 comments

The only way around this I can find is to use Visual Studio Code "Toggle Line Comment" after selecting all of the tests I don't currently want to run. This seems sub-optimal.

Other advances test frameworks like nose for python have support for single test execution by specifying: module name.class name:function name

Might be worth considering as a new feature.

You can use the --match flag.

https://github.com/avajs/ava#running-tests-with-matching-titles

Yes, just discovered this. Thanks! (Apologies for the obvious question.)

new link for 2019 - https://github.com/avajs/ava/blob/master/docs/05-command-line.md#running-tests-with-matching-titles

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kozzztya picture kozzztya  路  5Comments

ehmicky picture ehmicky  路  4Comments

fregante picture fregante  路  3Comments

carpasse picture carpasse  路  3Comments

fleg picture fleg  路  3Comments