Skip to content

test.skip should accept a condition #2979

Open
@sindresorhus

Description

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');

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions