playwright
playwright copied to clipboard
[Feature] Allow to fail tests unconditionally with description
Currently, unconditional test.fail()
doesn't accept description. In order to mark test 'failed', I need to use either comments, or use conditional form with 'true':
test("function works properly", async () => {
test.fail("Fails because of JIRA-123"); // doesn't work
test.fail(true, "Fails because of JIRA-123"); // works
test.fail(); // "Fails because of JIRA-123" // works
expect(0).toBeTruthy();
});
It would be nice to have ability to add optional description to unconditional test.fail: test.fail(description?:string)