Search code examples
javascripttestingskipava

How to have test execution skipped based on some condition (let's say environment variable) using AVA framework


I need to skip some tests base on the condition. Due to the current framework setup the best possibility would be to use environment variable. Something like

test.before(() => {if(skipAll==true) skipAllTests();})

Solution

  • Perhaps you could put the test() calls in an if condition?