ava
ava copied to clipboard
`test.skip` should accept a condition
Sometimes you need to skip a test based on a condition, for example, only skip the test when run on Windows.
This would be kinda ugly to apply to the existing .skip modifier though:
test.skip(process.platform === 'win32')('x', t => {
t.fail();
});
Maybe AVA could also support trailing modifiers:
test('x', t => {
t.fail();
})
.skip(process.platform === 'win32');
The "forkable test interface" I was looking to experiment with in https://github.com/avajs/ava/pull/2435 would work for this.
I don't think we can easily add a trailing skip.
Was this ever implemented in any manner?
No.